Results 1 to 21 of 21

Thread: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 10/06/21)

  1. #1

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

    Post [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys (Updated 10/06/21)

    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

    Name:  Snap_CCHH_1.jpg
Views: 498
Size:  54.8 KB

    Name:  Snap_CCHH_Config.jpg
Views: 439
Size:  30.8 KB


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

  2. #2
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    321

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

    Big Pit, very good as always, MADE IN ARGENTINA!!
    leandroascierto.com Visual Basic 6 projects

  3. #3
    Hyperactive Member
    Join Date
    Jan 2015
    Posts
    461

    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

  4. #4

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

    Quote Originally Posted by Thierry69 View Post
    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 :/

  5. #5
    Hyperactive Member
    Join Date
    Jan 2015
    Posts
    461

    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

  6. #6
    Addicted Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    245

    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

  7. #7

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

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

  8. #8
    Hyperactive Member
    Join Date
    Aug 2020
    Posts
    318

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

    Many people do not have MS-Office installed on their computers.

  9. #9
    New Member
    Join Date
    Nov 2013
    Posts
    8

    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.

  10. #10

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

    Quote Originally Posted by yokesee View Post
    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 View Post
    Many people do not have MS-Office installed on their computers.

    Try now please! I removed the dependency and seems to be working

  11. #11
    Hyperactive Member
    Join Date
    Aug 2020
    Posts
    318

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

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

  12. #12

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8c

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

  13. #13
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,524

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d

    I think you should replace "/ 15" with "/ Screen.TwipsPerPixelY"

  14. #14
    Taking a Break
    Join Date
    Jan 2020
    Posts
    1,340

    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

  15. #15
    Addicted Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    245

    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

  16. #16

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d

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

  17. #17

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d

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

  18. #18

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d

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

  19. #19
    Addicted Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    245

    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

  20. #20

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

    Re: [VB6] AddIn - Comment/Code Display + Highlight + Extra Hotkeys v0.8d

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

  21. #21

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

    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

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