473,379 Members | 1,184 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Commenting out a block of code in VS2005

How do you comment out a block of VB.Net code in VS2005? It seems to me
in an earlier version of VS I just ran the CommentRegion macro from the
Macro Explorer. But in VS2005 that does nothing.

--

Dennis
Apr 1 '08 #1
8 1521
On 2008-04-01, Dennis <no****@nowhere.comwrote:
How do you comment out a block of VB.Net code in VS2005? It seems to me
in an earlier version of VS I just ran the CommentRegion macro from the
Macro Explorer. But in VS2005 that does nothing.
Comment:
Higlight code, Ctrl-K,Ctrl-C

Uncomment:
Highlight code, Ctrl-K,Ctrl-U

There's also a button in the text editor toolbar :)
--
Tom Shelton
Apr 1 '08 #2
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<to*********@YOUKNOWTHEDRILLcomcast.netwrote:
>There's also a button in the text editor toolbar :)
Elementary my dear Watson!

--

Dennis
Apr 1 '08 #3
"Dennis" <no****@nowhere.comwrote in message
news:mt********************************@4ax.com...
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<to*********@YOUKNOWTHEDRILLcomcast.netwrote:
>>There's also a button in the text editor toolbar :)

Elementary my dear Watson!
If you're using C# then try

/*
My comment
*/
>
--

Dennis

Apr 2 '08 #4
"Dennis" <no****@nowhere.comwrote in message
news:mt********************************@4ax.com...
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<to*********@YOUKNOWTHEDRILLcomcast.netwrote:
>>There's also a button in the text editor toolbar :)

Elementary my dear Watson!
Ignore that, I frogot we was in the VB group! :-)
>
--

Dennis

Apr 2 '08 #5
On Apr 1, 9:46*pm, "Michael C" <m...@nospam.comwrote:
"Dennis" <nob...@nowhere.comwrote in message

news:mt********************************@4ax.com...
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<tom_shel...@YOUKNOWTHEDRILLcomcast.netwrote:
>There's also a button in the text editor toolbar :)
Elementary my dear Watson!

Ignore that, I frogot we was in the VB group! :-)


--
Dennis- Hide quoted text -

- Show quoted text -
Even in C#, it's easier to:

Highlight code, hit Ctrl-K,Ctrl-C

:)

--
Tom Shelton
Apr 2 '08 #6
On Apr 2, 5:54 am, Tom Shelton <tom_shel...@comcast.netwrote:
On Apr 1, 9:46 pm, "Michael C" <m...@nospam.comwrote:
"Dennis" <nob...@nowhere.comwrote in message
news:mt********************************@4ax.com...
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<tom_shel...@YOUKNOWTHEDRILLcomcast.netwrote:
>>There's also a button in the text editor toolbar :)
Elementary my dear Watson!
Ignore that, I frogot we was in the VB group! :-)
--
Dennis- Hide quoted text -
- Show quoted text -

Even in C#, it's easier to:

Highlight code, hit Ctrl-K,Ctrl-C

:)

--
Tom Shelton
Edit Menu Advanced Comment Selection
Apr 2 '08 #7
On Apr 2, 4:40*am, Phillip Taylor <Phillip.Ross.Tay...@gmail.com>
wrote:
On Apr 2, 5:54 am, Tom Shelton <tom_shel...@comcast.netwrote:


On Apr 1, 9:46 pm, "Michael C" <m...@nospam.comwrote:
"Dennis" <nob...@nowhere.comwrote in message
>news:mt********************************@4ax.com.. .
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<tom_shel...@YOUKNOWTHEDRILLcomcast.netwrote:
>There's also a button in the text editor toolbar :)
Elementary my dear Watson!
Ignore that, I frogot we was in the VB group! :-)
--
Dennis- Hide quoted text -
- Show quoted text -
Even in C#, it's easier to:
Highlight code, hit Ctrl-K,Ctrl-C
:)
--
Tom Shelton

Edit Menu Advanced Comment Selection- Hide quoted text -

- Show quoted text -
another possible way, but a lot more work then just using the
keyboard :)

--
Tom Shelton
Apr 3 '08 #8
On Apr 3, 2:58*am, Tom Shelton <tom_shel...@comcast.netwrote:
On Apr 2, 4:40*am, Phillip Taylor <Phillip.Ross.Tay...@gmail.com>
wrote:


On Apr 2, 5:54 am, Tom Shelton <tom_shel...@comcast.netwrote:
On Apr 1, 9:46 pm, "Michael C" <m...@nospam.comwrote:
"Dennis" <nob...@nowhere.comwrote in message
news:mt********************************@4ax.com...
On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
<tom_shel...@YOUKNOWTHEDRILLcomcast.netwrote:
>>There's also a button in the text editor toolbar :)
Elementary my dear Watson!
Ignore that, I frogot we was in the VB group! :-)
--
Dennis- Hide quoted text -
- Show quoted text -
Even in C#, it's easier to:
Highlight code, hit Ctrl-K,Ctrl-C
:)
--
Tom Shelton
Edit Menu Advanced Comment Selection- Hide quoted text -
- Show quoted text -

another possible way, but a lot more work then just using the
keyboard :)

--
Tom Shelton- Hide quoted text -

- Show quoted text -
And another way would be:
Press "home" button that brings you to beginning of code line then put
a apostrophe :-) Same way to remove.
Apr 3 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: rajeshb | last post by:
To toggle between two implementain with just one key stroke: by removing or adding a single "/" u can toggle between two C++ implementation. will be usefull when u want 2 test a sample...
46
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is...
4
by: Ron McNulty | last post by:
Often when testing an app, I want to temporarily comment out sections of the App.config file. Is there any way to do this? Regards Ron
3
by: Naveen Mukkelli | last post by:
Hi All, I'm trying to create XML commenting for my code using XML commenting feature for the first time. I'm using VS.NET 2003 and C#. I'v tried the following way. Step 1: set the file name...
8
by: lallous | last post by:
Hello I've been programming for a number of years, however my commenting style is always different. Sometimes I use something like: /************************ * method .... * comments......
6
by: julian_m | last post by:
I cant think in any reason why this code fails... Commented line shuldn't be completely ignored by the parser? <?php // ?whatever ehco 'bla bla';
1
by: Wijaya Edward | last post by:
Hi all, I have the following code: import sys import re ham_count = 0 spam_count = 0
100
by: Angel Tsankov | last post by:
Can someone recommend a good source of C/C++ coding style. Specifically, I am interested in commenting style and in particular how to indent comments and the commented code, rather than when to...
8
by: =?Utf-8?B?UmljaA==?= | last post by:
Is it possible to find the end of an If block in VB2005 -- similar to C# where in C# if you place your cursor next to a bracket and press ctrl something it highlights the ending bracket? I have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.