Results 1 to 23 of 23

Thread: Mass Commenting?

  1. #1

    Thread Starter
    Hyperactive Member notquitehere188's Avatar
    Join Date
    Dec 2004
    Posts
    403

    Mass Commenting?

    is there any way to make large comments, like the /* */ in c, or a hotkey to comment highlighted lines?
    It's not just Good, It's Good enough!



    Spelling Eludes Me

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Mass Commenting?

    edit: ignore me... but MZTools is still a useful toolbox

  3. #3
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Mass Commenting?

    VB has its own "block comments" feature:

    - go to View -> Toolbars ans select Edit...

    OR

    - right click on the toolbar and select Customize
    - select Commands tab
    - select Edit from the Categories
    - select "Comment Block" and/or "Uncomment Block" from the Commands list
    - drag/drop either on the VB IDE toolbar
    - new button will be created for each ...

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Mass Commenting?

    yes that's right

    i've forgotten which functionality is built in and which isn't - it's been a long week...

  5. #5

  6. #6
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Mass Commenting?

    Another method is to do line continuations:
    VB Code:
    1. 'This comment _
    2. will span _
    3. a few _
    4. lines.
    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  7. #7

  8. #8
    Hyperactive Member Fedhax's Avatar
    Join Date
    Aug 2006
    Posts
    293

    Re: Mass Commenting?

    Quote Originally Posted by RhinoBull
    In case anybody is wondering here is an image.
    Thanks for the information. I never knew about this functionality within the VB IDE.

    Is there a key shortcut to use this functionality like there is in Enterprise Manager's SQL IDE?

  9. #9

  10. #10
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: Mass Commenting?

    Quote Originally Posted by RhinoBull
    Unfortunately there isn't.
    Here is a little-known feature of VB. You can create your own shortcuts!

    1. Right click on the Comment Block Icon
    2. Choose Customize
    3. Right click on Comment Block Icon a second time
    4. Choose Image and Text
    5. Right click on Comment Block Icon a third time
    6. Add an ampersand in front of "Comment Block" in the Name: box so that it looks like &Comment Block
    7. Repeat for UnComment Block winding up with &UnComment Block
    8. Close the Customize window


    Alt-C and Alt-U will now comment and uncomment your highlighted text

  11. #11
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Mass Commenting?

    Dear MartinLiss,
    I tried. It is not working...

  12. #12

  13. #13
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Mass Commenting?

    Dear RhinoBull,
    Is it working.I am not abled to do?

  14. #14
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Mass Commenting?

    Quote Originally Posted by danasegarane
    Dear RhinoBull,
    Is it working.I am not abled to do?
    Yes it is working, but for uncomment, dont put & in front of U, because Alt+U is already assigned to Query menu.

    Furthermore, check if you are not pressing CTRL in place of ALT.
    Show Appreciation. Rate Posts.

  15. #15

  16. #16
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Mass Commenting?

    Sorry Guys.
    It's working now.I missed the text and Image option.

  17. #17

  18. #18
    Addicted Member
    Join Date
    Jun 2006
    Location
    Egypt
    Posts
    162

    Smile Re: Mass Commenting?

    Sorry for posting in an old topic.

    Quote Originally Posted by Fedhax
    Thanks for the information. I never knew about this functionality within the VB IDE.

    Is there a key shortcut to use this functionality like there is in Enterprise Manager's SQL IDE?
    Yes you can do that by Add-in named (MZ-Tools) , I can't imagine that there is a VB developer don't know it : http://www.mztools.com/

    For me I adjusted it to Comment/ Un-Comment via Shift+Ctrl+C / Shift+Ctrl+U

    Mohammed Sayed - Egypt - Anesthetist



    =

    =

  19. #19

  20. #20
    Addicted Member
    Join Date
    Jun 2006
    Location
    Egypt
    Posts
    162

    Re: Mass Commenting?

    Ooooops , I didn't saw that , I came here via a link to a post in the middle of the topic , So I didn't saw that , sorry , I just wanted to help
    Mohammed Sayed - Egypt - Anesthetist



    =

    =

  21. #21
    Hyperactive Member
    Join Date
    Oct 2006
    Location
    USA
    Posts
    476

    Re: Mass Commenting?

    Quote Originally Posted by RhinoBull
    VB has its own "block comments" feature:

    - go to View -> Toolbars ans select Edit...

    OR

    - right click on the toolbar and select Customize
    - select Commands tab
    - select Edit from the Categories
    - select "Comment Block" and/or "Uncomment Block" from the Commands list
    - drag/drop either on the VB IDE toolbar
    - new button will be created for each ...

    Awesome!

  22. #22
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Mass Commenting?

    I've been using VB for 6 months and Im surprised. Never knew VB could have some hidden functionality or it is just me whose ignorant. Anyway, this help me alot in commenting blocks.

  23. #23

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