Results 1 to 8 of 8

Thread: commenting out large blocks of code

  1. #1

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    commenting out large blocks of code

    Are there any tricks to commenting and uncommenting large blocks of code in VB?

    In C++ i can use /* and */ but in VB I have to use ' on every line.
    THX....
    Truly, you have a dizzying intellect.

  2. #2
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: commenting out large blocks of code

    nope im afaid. When the language was first created, one of th ethings to scalethe language down to manage without a compiler was get rid of the stuff they felt they did not need.

    This I asume was one of them.

    sorry bud.

    kai

  3. #3
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770

    Re: commenting out large blocks of code

    There are plug-ins you can get that do this... I did a search on planetsourcecode.com for something like this, here are the search results http://www.url2go.net/p. There are 2 programs on that site that do what you want.

  4. #4
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: commenting out large blocks of code

    If you are using vs.net you can highlight the code and press ctr+K, ctr+C to comment it and ctr+K, ctr+u to uncomment it.

  5. #5

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: commenting out large blocks of code

    I am using VS.NET
    I haven't been able to make your suggestion work.
    I found this but after I add it to the menu bar it remains inactive-
    http://www.a1vbcode.com/vbtip-86.asp

    Must be getting close!
    Truly, you have a dizzying intellect.

  6. #6
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770

    Re: commenting out large blocks of code

    Quote Originally Posted by mpdeglau
    If you are using vs.net you can highlight the code and press ctr+K, ctr+C to comment it and ctr+K, ctr+u to uncomment it.

    Are you serious? Thats FREAKING AWSOME!

    I didn't know that!

  7. #7
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: commenting out large blocks of code

    If you have the text editor task bar showing there is also two icons for this. One looks like a bunch of line with the center few a blue color (that comments the code), and a similar one with an arrow on top (that un comments the code. You can also go to Edit -> Advanced and it's there as well, with the key commands.

  8. #8

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: commenting out large blocks of code

    I opened up an older project that I did in ASP.net and it works fine.
    I just happened to be doing a classic ASP file in the VS.NET IDE and it doesn't seem to work with ASP.
    THX...
    Truly, you have a dizzying intellect.

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