|
-
Sep 26th, 2000, 09:59 PM
#1
Is there a way to comment a block of code, besides manually going to each line and ' ing it for each line? I mean, if C++ and Java have it, Visual Basic should have it too! 
-Jordan
-
Sep 26th, 2000, 10:00 PM
#2
Hyperactive Member
Not that I know of. I slightly checked one time and never found out how.
-
Sep 26th, 2000, 10:08 PM
#3
Member
1. Right click on your toobar and check Edit
2. Select your block of codes to comment
3. From the new set of toolbars, click on Comment Block
Note:
Other handy editing tools are provided as well as form editor tools.
hope this help.
Mikey
A/P
Using VB6 SP4 Enterprise Ed.
-
Sep 26th, 2000, 10:09 PM
#4
Frenzied Member
There is a way, I found it in the MSDN library
1. Your right click (in the toolbar area) and click on the EDIT toolbar
2. there are 2 buttons there. They have aqua blue lines in them. so you highlight the text that you want to comment then you click the left button and it automaticly adds the ' infront of very line, then the second button (to the right of it) un comments the code
NXSupport - Your one-stop source for computer help
-
Sep 26th, 2000, 10:10 PM
#5
Hyperactive Member
Good stuff. That toolbar is now docked to my other ones...
-
Sep 26th, 2000, 10:17 PM
#6
fantastic
Thanks.. too bad there's no syntax to do it manually (I personally hate using the mouse for anything)
-
Sep 26th, 2000, 10:20 PM
#7
Frenzied Member
you can do what I do sometimes:
Arrow Down
Arrow Left
'
Arrow Down
Arrow Left
'
etc....
NXSupport - Your one-stop source for computer help
-
Sep 26th, 2000, 10:25 PM
#8
Hyperactive Member
arrow down
arrow home
that's what I do, quick enough...
-
Sep 26th, 2000, 10:27 PM
#9
Frenzied Member
tell you'll have to strech your fingers to get both keys rapidly as where the arrows you can use your middle finger and index
NXSupport - Your one-stop source for computer help
-
Sep 26th, 2000, 10:30 PM
#10
Hyperactive Member
Oh, I'm using the numeral keypad to move around. I know it's not a good habit, but since my early commodore 64 years I used it that way =)
That's why I use 'Home'.
-
Sep 26th, 2000, 10:33 PM
#11
Frenzied Member
why isn't it a good habit
I'm not saying its a good habit, but its just not a bad habit, its just a prefrence
NXSupport - Your one-stop source for computer help
-
Sep 26th, 2000, 10:36 PM
#12
Hyperactive Member
I called it a bad habit since it often happens that someone uses my computer after me and they try using the numeral keypad as it's meant to be used: for typing numbers.
I often find myself more comfortable using that pad to type numbers so I have to toggle the Num Lock all the time.
For me it's a bad habit =) Arrows should work just fine... although it's nice to have the pgup, pgdn, home and end near.
-
Sep 27th, 2000, 08:42 PM
#13
dimava, I meant there's no actual syntax to comment big chunks of code ala Java: /*
Highlighting the text and clicking a toolbar button just to comment code is just too much work!!
-
Sep 28th, 2000, 10:37 AM
#14
Hyperactive Member
-
Sep 28th, 2000, 11:10 AM
#15
Actually there is a Syntactical way, place the apostrophe at the beginning of the block, then at the end of each line add a space and an underscore, i.e. [CODE]Private Sub Form_Load()
'Commented Block of Code _
See This 2nd Line is Commented too!
End Sub[CODE]
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
|