Results 1 to 15 of 15

Thread: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19

  1. #1

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Lightbulb VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19

    Hi guys I want to share my first Add-In with you: Document Map v1.5

    Name:  ScreenshotV1.3.jpg
Views: 315
Size:  42.6 KB

    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)



    IMPORTANT: While debuggin AddIns from the IDE I lost functionality of the right mouse (Definition,Last position,etc.) so before
    compiling do a backup of your registry key HKCU\Software\Microsoft\Visual Basic\6.0\UI
    If this happens to you deleting that key and reopening vb6 restore the lost functionality.
    This does not happen if you compile the DLL and use the AddIn normally.


    DOWLOAD: vb6_Addin_DocumentMapv1.5.zip



    Changelog
    =======
    v1.5 (20/08/19)
    +Right mouse menu integration on VB Ide (to add marks)
    +New Toolbar Icon

    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.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.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.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.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.


    Older screenshot:
    Name:  DocumentMapSnap2.jpg
Views: 523
Size:  32.1 KB
    Last edited by shagratt; Apr 30th, 2020 at 11:21 PM. Reason: Updated

  2. #2
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    Re: VB6 - Document Map AddIn (code thumbnail navigation)

    very good addin
    I would put the option, floating window inside the ide.

    a greeting

  3. #3

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Re: VB6 - Document Map AddIn (code thumbnail navigation)

    Quote Originally Posted by yokesee View Post
    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.

  4. #4

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Re: VB6 - Document Map AddIn (code thumbnail navigation)

    Quote Originally Posted by yokesee View Post
    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

  5. #5
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    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

  6. #6

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Re: VB6 - Document Map AddIn (code thumbnail navigation) - Updated

    Quote Originally Posted by yokesee View Post
    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

  7. #7
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    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

  8. #8

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Re: VB6 - Document Map AddIn (code thumbnail navigation) - Updated 04/07/19

    Quote Originally Posted by yokesee View Post
    I have a problem as can be done to show the window as soon as it opens.
    Check new version. It's working now?

  9. #9
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    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

  10. #10

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    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.

  11. #11
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    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

  12. #12

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19

    Quote Originally Posted by yokesee View Post
    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)

  13. #13
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    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

  14. #14
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    512

    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.

  15. #15

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    129

    Re: VB6 - Document Map AddIn (graphical code thumbnail) - Updated 06/07/19

    Quote Originally Posted by yereverluvinuncleber View Post
    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

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
  •  



Click Here to Expand Forum to Full Width