-
May 9th, 2021, 11:49 PM
#1
Thread Starter
Addicted Member
[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: prj (AddIn) ComCodeDisplay v1.1.zip
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
Last edited by shagratt; Apr 19th, 2022 at 12:01 PM.
Reason: Update
-
May 10th, 2021, 12:36 AM
#2
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Big Pit, very good as always, MADE IN ARGENTINA!!
-
May 10th, 2021, 12:40 AM
#3
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
-
May 10th, 2021, 02:18 AM
#4
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
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 :/
-
May 10th, 2021, 02:30 AM
#5
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
-
May 10th, 2021, 07:27 AM
#6
Hyperactive Member
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
-
May 10th, 2021, 01:04 PM
#7
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
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
-
May 10th, 2021, 08:40 PM
#8
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
Many people do not have MS-Office installed on their computers.
-
May 10th, 2021, 09:18 PM
#9
New Member
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.
-
May 10th, 2021, 10:36 PM
#10
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
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
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
-
May 11th, 2021, 02:38 AM
#11
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
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
-
May 11th, 2021, 03:28 AM
#12
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c
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.
-
May 11th, 2021, 04:50 AM
#13
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
I think you should replace "/ 15" with "/ Screen.TwipsPerPixelY"
-
May 11th, 2021, 06:32 AM
#14
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
-
May 11th, 2021, 10:32 AM
#15
Hyperactive Member
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.
a greeting
-
May 11th, 2021, 12:36 PM
#16
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
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.
-
May 11th, 2021, 01:10 PM
#17
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
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.
-
May 11th, 2021, 01:18 PM
#18
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
Originally Posted by yokesee
Thank you very much for bothering to remove the reference.
I have the following visual errors.
modify the offset but it doesn't work.
a greeting
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.
-
May 11th, 2021, 02:12 PM
#19
Hyperactive Member
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
-
May 11th, 2021, 03:14 PM
#20
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d
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
-
Jun 9th, 2021, 10:43 PM
#21
Thread Starter
Addicted Member
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
-
Aug 26th, 2021, 06:22 AM
#22
Addicted Member
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?
-
Aug 26th, 2021, 12:49 PM
#23
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 10/06/21
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 ?
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. :-/
-
Aug 26th, 2021, 10:25 PM
#24
Thread Starter
Addicted Member
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
-
Aug 27th, 2021, 06:27 AM
#25
Addicted Member
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:
https://gs.statcounter.com/windows-v...-200901-202107
v1.1 runs much faster on a large project than v1.0.
Last edited by OldClock; Aug 27th, 2021 at 06:41 AM.
-
Apr 18th, 2022, 01:58 PM
#26
Addicted Member
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.
M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?
-
Apr 19th, 2022, 12:00 PM
#27
Thread Starter
Addicted Member
Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 28/08/21
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.
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.
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)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|