-
Jul 23rd, 2019, 10:43 PM
#1
Thread Starter
Addicted Member
[VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
Please download a newer version here: https://www.vbforums.com/showthread....test-versions)
This post is old and will not be updated
***************************************************************************************************
Hi guys I want to share my first Add-In with you: Document Map v2.0 (important bugfix!)
It display graph colored representation of the current code window wich can be clicked to navigate from
one point of the code to another instantly
It shows what part of the code you're seeing in the editor.
Its flicker free!
It has checks to not redraw when there is no code/views changes (its fast and not cpu intensive)
Default Colors:
-Grey: Normal code
-Light Grey: Begin of sub/function
-Green: Comments
Left Click jump to that part of code.
Right click brings a menu to add/remove marks:
Cause I dont know how to access the Flags/Breakpoints I added a few special delimiters
that draw visual clues on the Document Map. (Must be the first chars in the line, except TODO)
'*- = Full purple line
'*1 = Red mark on the right
'*2 = Yellow mark on the right
'*3 = Cyan mark on the right
'TODO: = Shorter green mark on the right
(Marks are part of the code so, unlike bookmarks, they are saved)
Use "Standard API Color Picker" by Elroy
DOWLOAD: vb6_Addin_DocumentMapv2.0.zip
Changelog
=======
v1.0 (24/07/19)
+Basic version as proof of concept (it just 'works') and is my first AddIn. There is a lot
of room for improvement.
v1.1 (26/07/19)
+Change focus back to project so mousewheel works after clicking document map
+Moving while keeping the mouse pressed allow smooth scrolling through the document map
+Right mouse menu give option to set / remove marks
+Codeview are now centered on the click
+While mouse button held it show the name of Sub / Fuction in that part of code
+Support for CodeSmart bookmarks
v1.2 (28/07/19)
+Integrated in VB6 Ide (No more a floating on-top form)
+Full analisys for marks (before was skipping lines if code was too big)
+Reworked some logics for faster code
v1.3 (04/08/19)
+Better drawing representation (with spaces, no more just lines)
+No more double height lines on short documents (double line space instead)
v1.4 (06/08/19)
+Added a refresh to the UserDocument after redrawing wich make it more responsive using a compiled dll while
moving the mouse with the left button down.
+Recicle AddIn toolbar menu (only useful if youre editing the addin and stop it without removing it from
another proyect.
v1.5 (20/08/19)
+Right mouse menu integration on VB Ide (to add marks)
+New Toolbar Icon
v1.6 (06/12/19)
+Added new button to clear inmediate window
v1.7 (07/06/21)
+Added Codemap default region header/footer
+Improve some colors a little. (more contrast on Function/Sub)
+Fixed End Sub/Function draw with a line (should have been working before)
+No more dependency on Office library
+Selection is highlighted on the document map
v2.0 (16/06/21)
+Added Zoom on right mouse menu over Documentmap with zoom level indication and reset.
(Only available on large files and depending on documentmap window size)
+New command bar to move up/down between marks 1,2,3
+Added configuration screen
+Added customizable colors
+Fixed bug wich caused IDE icons to disappear under certain circunstances (Finally!)
IMPORTANT: Before version 2.0 there was bug that produce missing icons on the IDE.
If this happened to you, deleting the reg key "HKCU\Software\Microsoft\Visual Basic\6.0\UI"
and reopening vb6 will restore the lost icons
Improvements while dragging LMB over Documentmap:
+Show procedure name near mouse always (before was only when declaration was visible on screen)
+Full procedure highlight while moving
+Show linenumber
Last edited by shagratt; Apr 19th, 2022 at 11:36 AM.
Reason: Updated
-
Jul 24th, 2019, 07:33 PM
#2
Hyperactive Member
Re: VB6 - Document Map AddIn (code thumbnail navigation)
very good addin
I would put the option, floating window inside the ide.
a greeting
-
Jul 25th, 2019, 12:59 PM
#3
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (code thumbnail navigation)
Originally Posted by yokesee
very good addin
I would put the option, floating window inside the ide.
a greeting
What did you mean with "Inside the ide" ? This is my first AddIn and still dont know much about interacting with the toolbars in the IDE thats why I implementing everything in AddIn window itself
I plan to make it colapsable with double clicking the title so it will be not much need to enabling/disabling the onTop feature at all. I work with a dual monitor setup and put it on my second monitor (to the right) so it stay there all the time. But love to hear feedback and ideas.
-
Jul 31st, 2019, 10:41 AM
#4
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (code thumbnail navigation)
Originally Posted by yokesee
very good addin
I would put the option, floating window inside the ide.
a greeting
I think I nailed what you mean with "inside the ide". Since v1.2 is part of the ide now
-
Jul 31st, 2019, 02:47 PM
#5
Hyperactive Member
Re: VB6 - Document Map AddIn (code thumbnail navigation) - Updated
Very good work, if I was referring to that window, it is perfect like that.
you could add a contextual menu in editor right click menu, and in the line where you add the texts '* 1' * 2 ...
keep up the good work
Greetings
-
Aug 4th, 2019, 04:17 PM
#6
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (code thumbnail navigation) - Updated
Originally Posted by yokesee
Very good work, if I was referring to that window, it is perfect like that.
you could add a contextual menu in editor right click menu, and in the line where you add the texts '* 1' * 2 ...
keep up the good work
Greetings
That's a good idea but unfortunately I dont know how to add things to the right click standard menu :/
I uploaded a new version today with better drawing of the code. Hope you like it
-
Aug 5th, 2019, 09:49 AM
#7
Hyperactive Member
Re: VB6 - Document Map AddIn (code thumbnail navigation) - Updated 04/07/19
Very good work keep it up.
You're right I thought it was simpler
I've been researching the menu and I can't find anything.
some type of subclass or hook of the menu will be used.
I have a problem as can be done to show the window as soon as it opens.
Greetings
-
Aug 6th, 2019, 12:40 PM
#8
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (code thumbnail navigation) - Updated 04/07/19
Originally Posted by yokesee
I have a problem as can be done to show the window as soon as it opens.
Check new version. It's working now?
-
Aug 16th, 2019, 06:39 PM
#9
Hyperactive Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
You have made some improvement to the code look I found this project in a discursion.
in the added items to the contextual menu.
When I have time I will try to see how he has implemented it now I have a lot of work.
If it helps you.
http://www.planet-source-code.com/vb...74734&lngWId=1
Greetings
-
Aug 19th, 2019, 02:14 AM
#10
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
I successfully added a new submenu with all the options to the right click in code window, but now my problem is Im unable to detect the line where you opened the menu. My workarroud is to use SendKey to emulate the typing but im not happy with the result so I will keep looking for a way to get that info.
-
Aug 19th, 2019, 12:45 PM
#11
Hyperactive Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
find this
Code:
Dim lngStartLine As Long
Dim lngStartColumn As Long
Dim lngEndLine As Long
Dim lngEndColumn As Long
' Only add a new line if a code pane is present.
If VBInstance.CodePanes.Count > 0 Then
' Retrieve the starting line of the
' selection in active code pane.
VBInstance.ActiveCodePane.GetSelection lngStartLine, _
lngStartColumn, lngEndLine, lngEndColumn
' Add a line at the location that is
' retrieved in the GetSelection statement.
VBInstance.ActiveCodePane.CodeModule.InsertLines lngStartLine, _
"'Line inserted from Add-In"
End If
-
Aug 20th, 2019, 05:12 PM
#12
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
Originally Posted by yokesee
find this
Code:
Dim lngStartLine As Long
Dim lngStartColumn As Long
Dim lngEndLine As Long
Dim lngEndColumn As Long
' Only add a new line if a code pane is present.
If VBInstance.CodePanes.Count > 0 Then
' Retrieve the starting line of the
' selection in active code pane.
VBInstance.ActiveCodePane.GetSelection lngStartLine, _
lngStartColumn, lngEndLine, lngEndColumn
' Add a line at the location that is
' retrieved in the GetSelection statement.
VBInstance.ActiveCodePane.CodeModule.InsertLines lngStartLine, _
"'Line inserted from Add-In"
End If
Great Yokesee!!! Thankyou for pointing that out. I thought that was for getting selected text only! Now I got it working! Uploading new version now (v1.5)
-
Aug 20th, 2019, 06:58 PM
#13
Hyperactive Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
Nothing, the work is yours.
I wish I had more time to help you.
I hope you add more things, for me it will be very useful.
Greetings
-
Apr 29th, 2020, 06:39 PM
#14
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
I love it but I had real problems getting it to dock on the right hand side of the code page next to the vertical scrollbar. In the end I did it but I am still unsure how. Superb add in.
-
Apr 30th, 2020, 06:20 AM
#15
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19
Originally Posted by yereverluvinuncleber
I love it but I had real problems getting it to dock on the right hand side of the code page next to the vertical scrollbar. In the end I did it but I am still unsure how. Superb add in.
We all got into that fight. Snaping addins windows can be frustrating sometimes. you can press shift when moving it to avoid snap on the undesired place
-
Jun 7th, 2021, 12:55 PM
#16
Thread Starter
Addicted Member
Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 07/06/21
v1.7 (07/06/21)
+Added Codemap default region header/footer mark ('/////...)
+Improve some colors a little. (more contrast on Function/Sub)
+Fixed End Sub/Function draw with a line (should have been working before)
+No more dependency on Office library
+Selection is highlighted on the document map
-
Jun 16th, 2021, 02:51 PM
#17
Thread Starter
Addicted Member
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
v2.0 (16/06/21)
+Added Zoom on right mouse menu over Documentmap with zoom level indication and reset.
(Only available on large files and depending on documentmap window size)
+New command bar to move up/down between marks 1,2,3
+Added configuration screen
+Added customizable colors
+Fixed bug wich caused IDE icons to disappear under certain circunstances (Finally!)
IMPORTANT: Before version 2.0 there was bug that produce missing icons on the IDE.
If this happened to you, deleting the reg key "HKCU\Software\Microsoft\Visual Basic\6.0\UI"
and reopening vb6 will restore the lost icons
Improvements while dragging LMB over Documentmap:
+Show procedure name near mouse always (before was only when declaration was visible on screen)
+Full procedure highlight while moving
+Show linenumber
-
Apr 5th, 2022, 03:25 PM
#18
Addicted Member
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
Where is the download link?
-
Apr 5th, 2022, 03:38 PM
#19
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
-
Apr 6th, 2022, 01:13 AM
#20
Addicted Member
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
Oops! You're right, I missed it.
-
Apr 17th, 2022, 02:20 PM
#21
Addicted Member
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
Interesting AddIn, which I must have missed earlier browsing through the code bank (so thank you Cube8 for not finding the file ), and I will play a bit more with it before giving a judgment. Just one thing, the font size in the Document Map pane is really tiny and the only options available it appears (by right click context menu) is to make it even smaller! I know the code is there so I could possibly change it but would be interesting to hear from OP on this, what his thinking is and what he may have tried to work on to make the display more readable? A setting for the font size maybe, and a scroll bar...
Otherwise, I like the idea to have an overview of the code with the ability to quickly jump back and forth.
One thing noted already. I use a tabbed interface for the code/designer panes (from Code Smart 2013 AddIn) and it appears that the Map pane doesn't update first time I change from one tab to the other, not until I repeat the action a second time.
M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?
-
Apr 19th, 2022, 11:35 AM
#22
Thread Starter
Addicted Member
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
Originally Posted by 7edm
Interesting AddIn, which I must have missed earlier browsing through the code bank (so thank you Cube8 for not finding the file ), and I will play a bit more with it before giving a judgment. Just one thing, the font size in the Document Map pane is really tiny and the only options available it appears (by right click context menu) is to make it even smaller! I know the code is there so I could possibly change it but would be interesting to hear from OP on this, what his thinking is and what he may have tried to work on to make the display more readable? A setting for the font size maybe, and a scroll bar...
Otherwise, I like the idea to have an overview of the code with the ability to quickly jump back and forth.
One thing noted already. I use a tabbed interface for the code/designer panes (from Code Smart 2013 AddIn) and it appears that the Map pane doesn't update first time I change from one tab to the other, not until I repeat the action a second time.
Hi 7edm!
The document map is a visual guide. Its not a 'tiny font' at all. What you see are just lines where characters should be. You can make it display actual characters but I dont find any reason to make it cause you will not be able to read a font smaller than 7 points unless you make the font so big that it will loose the intended purpose of having a representation of all the code in just one view.
Please download a newer version here: https://www.vbforums.com/showthread....test-versions)
-
Apr 19th, 2022, 04:04 PM
#23
Addicted Member
Re: [VB6] AddIn Document Map (graphical code thumbnail) - v2.0 Updated 16/06/21
Ok thanks. Whatever, the good side of it is that it got my eyes open for looking closer at the coding of Addins, so thanks for that. I will dig in to the latest versions of this and your other addin as I find both of them very useful.
M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?
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
|