is there any way to make large comments, like the /* */ in c, or a hotkey to comment highlighted lines?
edit: ignore me... but MZTools is still a useful toolbox
Last edited by bushmobile; Oct 13th, 2006 at 12:29 PM.
Take a moment to rate useful posts
VB6 CodeBank: Glass Form & Tracing App , MouseWheel with Any Control , Form Previewer Utility
VB6 Snippets: RTB: Disable Smooth Scrolling , Form: Left & Right Justified Text in TitleBar , ListBox: As-You-Type Filtering (fast) , MSFlexGrid: Non-Adjacent Col/Row Selection , IsProcessRunning: PSAPI / WMI , PictureBox: Frame Look-A-Like , Open Folder in a Particular View , Form: Always on Bottom
VBA Snippet: Generic Mouseover Workaround
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 ...
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
yes that's right![]()
i've forgotten which functionality is built in and which isn't - it's been a long week...
Take a moment to rate useful posts
VB6 CodeBank: Glass Form & Tracing App , MouseWheel with Any Control , Form Previewer Utility
VB6 Snippets: RTB: Disable Smooth Scrolling , Form: Left & Right Justified Text in TitleBar , ListBox: As-You-Type Filtering (fast) , MSFlexGrid: Non-Adjacent Col/Row Selection , IsProcessRunning: PSAPI / WMI , PictureBox: Frame Look-A-Like , Open Folder in a Particular View , Form: Always on Bottom
VBA Snippet: Generic Mouseover Workaround
In case anybody is wondering here are few images.
Last edited by RhinoBull; Oct 27th, 2006 at 07:49 AM. Reason: New "Customize Toolbar" image was added.
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
Another method is to do line continuations:
chemVB Code:
'This comment _ will span _ a few _ lines.
Visual Studio 6, Visual Studio.NET 2005, MASM
I don't think it's a good option:
- it's stil one line
- only 24 line continuations allowed
![]()
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
Thanks for the information. I never knew about this functionality within the VB IDE.Originally Posted by RhinoBull
![]()
Is there a key shortcut to use this functionality like there is in Enterprise Manager's SQL IDE?
Unfortunately there isn't.Originally Posted by Fedhax
![]()
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
Here is a little-known feature of VB. You can create your own shortcuts!Originally Posted by RhinoBull
- Right click on the Comment Block Icon
- Choose Customize
- Right click on Comment Block Icon a second time
- Choose Image and Text
- Right click on Comment Block Icon a third time
- Add an ampersand in front of "Comment Block" in the Name: box so that it looks like &Comment Block
- Repeat for UnComment Block winding up with &UnComment Block
- Close the Customize window
Alt-C and Alt-U will now comment and uncomment your highlighted text
Do not worry about your difficulties in Mathematics. I can assure you mine are still greater.Tips, Examples & Tutorials:
Albert Einstein
A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Private Message Viewer • Copy/Paste VB Code • Paste VB Code Add-In • Insert Procedure Names Add-In • A calculator for the game of Spider • My review of REALbasic 2008 • VB6 Debug Tutorial • Picture/Video Viewer • VBF Photo Contest Winners
2009 - 2013
Dear MartinLiss,
I tried. It is not working...
@Martin:
nice but I have a problem with this technic: you must be absolutely sure that hot key doesn't already exist elsewhere in the IDE or you may break some functionality.
Other than that as I said it is nice.![]()
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
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.Originally Posted by danasegarane
Furthermore, check if you are not pressing CTRL in place of ALT.![]()
Show Appreciation. Rate Posts.
Of course it does - just follow Martin's instructions.Originally Posted by danasegarane
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
Sorry Guys.
It's working now.I missed the text and Image option.![]()
Sounds better!![]()
![]()
![]()
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
Sorry for posting in an old topic.
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/Originally Posted by Fedhax
For me I adjusted it to Comment/ Un-Comment via Shift+Ctrl+C / Shift+Ctrl+U
![]()
@msayed2004:
You were late by about 13 days 4 hours and 16 minutes...![]()
MZTools utility was recommended by bushmobile in very first reply in this thread.
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings
Originally Posted by RhinoBull
Awesome!![]()
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.
All you have to do is to explore all menu options and/or toolbar buttons - that's all.Originally Posted by zynder
Microsoft MVP - Visual Basic 2006-2013
Why VB clears the clipboard on startup and how to avoid it? . Filtering Arrays . Save File To Database . Extract File From Database .
Extract picture from database without using hard drive . Change Menu BackColor . How to use MS Flexgrid . Make Frame Transparent .
The Easiest Way to Create an NT Service With VB6 . How to comment blocks of code in VB5 and VB6 . How to find and replace missing members of control array
Visual Basic 6.0 On-Line Documentation . Connection Strings