-
3 Attachment(s)
[VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 28/08/21)
Please download a newer version here: https://www.vbforums.com/showthread....test-versions)
This post is old and will not be updated
***************************************************************************************************
This is an add-in to display comments and code of user generated
Functons/Methods/Properties and also some info from typelibs in the project
It takes the text inside comments over the declarations and also from the menu
Tools->Procedure Attributes or inside typelibs
(optional) Also have extra hotkeys:
CTRL+Q: Smart lines comment / uncomment
CTRL+D: Duplicate Lines
CTRL+SHIFT+UP and CTRL+SHIFT+DOWN: Move Up or Down selected lines
(optional) Also has selection highlight on editor on all ocurrences of text/selection. Note: Only support MONOSPACE FONTS
IMPORTANT: This is a WIA (Work In Progress) I'm releasing this AddIn as
an unfinished project. Its working but I feel there is still some more
polishing to do. Just dont have the time needed right now.
NOTE: If highlighting a word doesnt seem to work try selecting another word and then
reselecting the word you want to hihglight OR scroll the editor up/down to force
re apply highlighting.
Special thanks to Fafalone and LaVolpe for helping how to access typelibs data.
DOWNLOAD: Attachment 182186
Changelog:
v0.8 (06/05/21)
+Initial release.
v0.8b (07/05/21)
+Highlight: Fixed default font values and without comment viewer
v0.8c (10/05/21)
+Highlight: Fixed horizontal scrolling on editor
v0.8d (11/05/21)
+Highlight: Fixed lines with ampersand ('&')
+Removed reference to Office objects
v0.8e (12/05/21)
+Fixed default VB6 to Courier New and not Times New Roman
(for people who have never changed the font)
v1.0 (10/06/21)
+Fixed ExtraHotkeys to work on all opened VB6 instances and not just one
v1.1 (26/08/21)
+Fixed Loading, now support big groups with multiple projects
+Comments with lines with separators like '======' (same char) are cut to display better
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Big Pit, very good as always, MADE IN ARGENTINA!!
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Very nice.
Compiled, and already using it.
This is one of the feature I like in Visual Studio 2019.
NB : A minor bug for the moment
When I select the variable in the line
oHTTP_Record.Close
or
oHTTP_Record.MoveNext
It hightlights the whole line, instead of oHTTP_Record only
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Quote:
Originally Posted by
Thierry69
Very nice.
Compiled, and already using it.
This is one of the feature I like in Visual Studio 2019.
NB : A minor bug for the moment
When I select the variable in the line
oHTTP_Record.Close
or
oHTTP_Record.MoveNext
It hightlights the whole line, instead of oHTTP_Record only
When you write or just place the cursor its a feature not a bug. It try to detect the object the method belong to.
if you are using A.Draw, B.Draw, C.Draw it will make a distinction between A.Draw and B.Draw because its not the same call.
But if you select Draw with the mouse then it should paint all "DRAW" text no matter what.
I know there are some glitchs still to be fixed :/
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
You could configure it as customisable settings.
Also, maybe avoid to highlight some characters like ) ( = - etc...
at least if less than 2 chars are selected
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
I am having trouble compiling the add-in.
"The binary compatibility DLL or EXE contains a parameter type or return type whose definition can not be found"
I don't have office installed.
it is required for this plugin.
MISSING: Microsoft Office 12.0 Object Library
greetings, good job as always
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Quote:
Originally Posted by
yokesee
I am having trouble compiling the add-in.
"The binary compatibility DLL or EXE contains a parameter type or return type whose definition can not be found"
I don't have office installed.
it is required for this plugin.
MISSING: Microsoft Office 12.0 Object Library
greetings, good job as always
You need the reference for this:
Dim mcbMenuCommandBar As Office.CommandBarControl
Dim ToolbarIcon1 As Office.CommandBarControl
Not sure how you can do it without it
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Many people do not have MS-Office installed on their computers.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Great addin shagratt, this one together with the DocumentMap makes coding and debugging easier. :D
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Quote:
Originally Posted by
yokesee
I am having trouble compiling the add-in.
"The binary compatibility DLL or EXE contains a parameter type or return type whose definition can not be found"
I don't have office installed.
it is required for this plugin.
MISSING: Microsoft Office 12.0 Object Library
greetings, good job as always
Quote:
Originally Posted by
SearchingDataOnly
Many people do not have MS-Office installed on their computers.
Try now please! I removed the dependency and seems to be working
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Quote:
Originally Posted by
shagratt
Try now please! I removed the dependency and seems to be working
Thank you, shagratt.
What's this:
Code:
TextHY& = (Me.TextHeight("j?) / 15) '* FDPI
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Quote:
Originally Posted by
SearchingDataOnly
What's this:
Code:
TextHY& = (Me.TextHeight("j?) / 15) '* FDPI
The text is "jÄ". One of the lowest letters with one of the highest. I use it to get the height of standard line with the selected font.
I should also noted in the description that it only support monospace fonts. I'm not sure what font is standard for the asian versions of vb6. I can only test English and Spanish ones.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
I think you should replace "/ 15" with "/ Screen.TwipsPerPixelY"
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
There is a problem with the code, the compilation fails
frmAddIn.frm
TextHY& = (Me.TextHeight("j?) / 15) '* FDPI
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Thank you very much for bothering to remove the reference.
I have the following visual errors.
modify the offset but it doesn't work.
https://www.vbforums.com/images/ieimages/2021/05/1.png
a greeting
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Quote:
Originally Posted by
xiaoyao
There is a problem with the code, the compilation fails
frmAddIn.frm
TextHY& = (Me.TextHeight("j?) / 15) '* FDPI
Replace "j? with "jÁ" I will change in the code the original Ä with Á seems to be causing a problem with asian fonts.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Quote:
Originally Posted by
Arnoutdv
I think you should replace "/ 15" with "/ Screen.TwipsPerPixelY"
Done! Thanks for the suggestion. Also replaced with Screen.TwipsPerPixelX where needed.
But support for high DPI is currently not supported and may not work at all.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Quote:
Originally Posted by
yokesee
Hi Yokesee! It looks like the font used to Highlight is not the same youre using in the IDE (problem detecting the right font?). Try going to the VB6 options and change the IDE font to "Consolas" then close and restart VB6. If it work then change again to the font you want and restart again to see if its working.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Wauuu you are the best, it works perfectly.
A small bug or not.
When you have highlighted a word and you change to a block of comments, it continues marking highlighted above
very good work
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Quote:
Originally Posted by
yokesee
Wauuu you are the best, it works perfectly.
A small bug or not.
When you have highlighted a word and you change to a block of comments, it continues marking highlighted above
very good work
I'm not sure to understand you. I tried to select text o just put the cursor over a word. Then I pressed the comment button and it change the highlighting to the same word and visually it update the position 1 char to the right. Dont see any bug there
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 10/06/21
v1.0 (10/06/21)
+Fixed ExtraHotkeys to work on all opened VB6 instances and not just one
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 10/06/21
Hey
I'm using WinXP SP3 and in v1.0 I had to edit ComCodeDisplay.vbp and change
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0; MSCOMCTL.OCX
to
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
otherwise the project failed to open.
How do I get the "PopOut" windows to appear?
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 10/06/21
Quote:
Originally Posted by
OldClock
Hey
I'm using WinXP SP3 and in v1.0 I had to edit ComCodeDisplay.vbp and change
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0; MSCOMCTL.OCX
to
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
otherwise the project failed to open.
Seems I got a newer version... And when I encountered that problem on other projects I fixed them in the same way you did.
I wonder why are you still using XP ?
Quote:
Originally Posted by
OldClock
How do I get the "PopOut" windows to appear?
When you select something in the code, if it detect a description for it, it will open the window with the description on the top-right (default position) and there, near the cog (config) icon you have the popout button. Its shown in the first picture in the first post.
Right now I think there is a bug in the detection system. I only tested on single proyects with no more than 20 files. When tried to use it on a big multi proyect work seems to fail to detect anything. :-/
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 28/08/21
Update:
v1.1 (26/08/21)
+Fixed Loading, now support big groups with multiple projects
+Comments with lines with separators like '======' (same char) are cut to display better
-
1 Attachment(s)
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 28/08/21
> I wonder why are you still using XP ?
Two-fold: first, I code in a virtual machine from Linux, and WinXP is much faster in a VM than Win10. Second, until recently a lot of the African users of my software still used WinXP, though now it looks like most have moved on:
Attachment 182190
https://gs.statcounter.com/windows-v...-200901-202107
v1.1 runs much faster on a large project than v1.0.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 28/08/21
I'm currently testing this Add-in (together with Document Map) and I'm not quite sure about the scope of the Add-in as sometimes I see something happens and sometimes not, when click on or highlight a code member. So what exactly does "user generated Functons/Methods/Properties" imply? I would imaging e.g. functions and subs I create in my modules/forms code windows, but obviously not as they don't yield any response. Class members though brings some live to it but I'm still to see any code show up in that little window in the top right corner. Also, the image in 1st post is of very low quality and hard to read.
I was wondering, I have Code Smart 2013 installed and activated and wonder if there could be some conflict as at some point I saw the add-in window show to just immediately go away.
-
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 28/08/21
Quote:
Originally Posted by
7edm
I'm currently testing this Add-in (together with Document Map) and I'm not quite sure about the scope of the Add-in as sometimes I see something happens and sometimes not, when click on or highlight a code member. So what exactly does "user generated Functons/Methods/Properties" imply? I would imaging e.g. functions and subs I create in my modules/forms code windows, but obviously not as they don't yield any response. Class members though brings some live to it but I'm still to see any code show up in that little window in the top right corner.
Hi 7edm!
It should detect the functions/subs you create on most cases. Just remember they need to have explicit scope ("Public Sub XXXX" / "Private Sub XXXX" instead of "Sub XXXX"). The parser I made is not perfect but should detect lots of cases without errors.
Quote:
Originally Posted by
7edm
Also, the image in 1st post is of very low quality and hard to read.
Yes I know...Sadly quality of jpgs uploaded to this forums become too compressed to save space.
Quote:
Originally Posted by
7edm
I was wondering, I have Code Smart 2013 installed and activated and wonder if there could be some conflict as at some point I saw the add-in window show to just immediately go away.
I use CodeSmart too and have no problem with that. It was designed with compatibility with it in mind.
The first time It may show and hide inmediately but after that it should start working fine. (It was a bug... cant remember if I got it fixed in the latest version (not the one on this post) I only remember spending lot of time tracking why happened)
Please download a newer version here: https://www.vbforums.com/showthread....test-versions)