Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. VS.NET 2003 collapsible text

VS.NET 2003 collapsible text

Scheduled Pinned Locked Moved The Lounge
csharpc++visual-studioquestion
23 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Marc Clifton

    Jonny Newman wrote: #region/#endregion is so usefull in VC#. Large class files are easy to work on... I have decided that I can't stand them, even after creating keyboard shortcuts to collaps and uncollapse them. They just get in the way, and their a poor replacement for what C# should really support, which is the ability to have class methods defined across several files like you can do in C++. Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
    Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
    Every line of code is a liability - Taka Muraoka
    Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

    D Offline
    D Offline
    Daniel Turini
    wrote on last edited by
    #6

    Marc Clifton wrote: which is the ability to have class methods defined across several files like you can do in C++. MS says that the next version of VS.NET (VS.NET 2004?) will have it, along with templates, and more bells and whistles; This also helps when you want to create code generators and let the code generator implement part of a class and the programmer the other part. A sample one is the form designer, which puts that ugly "do not touch here or you'll die" region in the middle of your code. If, at least .NET supported multiple inheritance, we could split the implementation between two or more files when the class implementation becomes too big.


    It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

    M 1 Reply Last reply
    0
    • D Daniel Turini

      Marc Clifton wrote: which is the ability to have class methods defined across several files like you can do in C++. MS says that the next version of VS.NET (VS.NET 2004?) will have it, along with templates, and more bells and whistles; This also helps when you want to create code generators and let the code generator implement part of a class and the programmer the other part. A sample one is the form designer, which puts that ugly "do not touch here or you'll die" region in the middle of your code. If, at least .NET supported multiple inheritance, we could split the implementation between two or more files when the class implementation becomes too big.


      It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #7

      Daniel Turini wrote: MS says that the next version of VS.NET (VS.NET 2004?) will have it Nothing like delivering a half completed product, is there? Keeps those MSDN subscriptions current and bucks rolling in, huh? Where's the damn competition when you need it? This is nothing more than a parsing issue! Oh, but wait. There's Intellisense. Or whatever it's called. The thing that keeps popping up with "try again in a few minutes after the system has loaded 50 megabytes worth of stuff" and the thing that gets in the way when I'm editing code, so I have to hit the damn ESC key because I can't get out of the popup window that has 20 different constructor options that I'm perpetually stuck scrolling through with the down arrow. I do believe I'm about to nuke that feature of the IDE. Daniel Turini wrote: This also helps when you want to create code generators Why do I get the impression that this is where programming is heading. Ummm. Again. (I remember going to some expo is SF when I was about 20, and some guy had a BASIC code generator that was supposed to mark the end of manual programming. That was 20 years ago. Here we go again, it seems. Oh, but wait! There's XML!!! :laugh: ) Daniel Turini wrote: If, at least .NET supported multiple inheritance, we could split the implementation between two or more files :rolleyes: Now there's the best use for multiple inheritence that I've heard of! Take that, you Java dogs! (OK, I'm in a flippant mood today). Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
      Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
      Every line of code is a liability - Taka Muraoka
      Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

      T D 2 Replies Last reply
      0
      • D David Wulff

        I haven't found one, and there definately wasn't one for the 2002 release. Someone should let the good folk over at Whole Tomato know to they can add support for: //#region //#endregion into Visual Assist.NET.


        David Wulff

        "i said no to noddy like 20 times but in the end i just couldnt say no to him anymore" - Wishful Thinking

        C Offline
        C Offline
        Chris Maunder
        wrote on last edited by
        #8

        David Wulff wrote: Someone should let the good folk over at Whole Tomato know... Consider them advised. cheers, Chris Maunder

        1 Reply Last reply
        0
        • M Marc Clifton

          Daniel Turini wrote: MS says that the next version of VS.NET (VS.NET 2004?) will have it Nothing like delivering a half completed product, is there? Keeps those MSDN subscriptions current and bucks rolling in, huh? Where's the damn competition when you need it? This is nothing more than a parsing issue! Oh, but wait. There's Intellisense. Or whatever it's called. The thing that keeps popping up with "try again in a few minutes after the system has loaded 50 megabytes worth of stuff" and the thing that gets in the way when I'm editing code, so I have to hit the damn ESC key because I can't get out of the popup window that has 20 different constructor options that I'm perpetually stuck scrolling through with the down arrow. I do believe I'm about to nuke that feature of the IDE. Daniel Turini wrote: This also helps when you want to create code generators Why do I get the impression that this is where programming is heading. Ummm. Again. (I remember going to some expo is SF when I was about 20, and some guy had a BASIC code generator that was supposed to mark the end of manual programming. That was 20 years ago. Here we go again, it seems. Oh, but wait! There's XML!!! :laugh: ) Daniel Turini wrote: If, at least .NET supported multiple inheritance, we could split the implementation between two or more files :rolleyes: Now there's the best use for multiple inheritence that I've heard of! Take that, you Java dogs! (OK, I'm in a flippant mood today). Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
          Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
          Every line of code is a liability - Taka Muraoka
          Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

          T Offline
          T Offline
          Topper Price
          wrote on last edited by
          #9

          Sounds like you need to find an new profession. X|

          M D 2 Replies Last reply
          0
          • B billb2112

            In C# we have the collapsible (folding) text with the handy dandy #region directive to arbitrarily set a region to collapse. MS was nice enough to extend the folding abilities to C++ developers this time around, however, I don't seem to see any sort of equivalent to #region. Has anyone found this yet? Give me one more medicated peaceful moment

            S Offline
            S Offline
            Stephane Rodriguez
            wrote on last edited by
            #10

            With VC++.NET, outlining is explicitely managed using the context menu. There is no equivalent to the C# #region keyword. And Visual Assist.NET doesn't bring this feature either.

            S 1 Reply Last reply
            0
            • S Stephane Rodriguez

              With VC++.NET, outlining is explicitely managed using the context menu. There is no equivalent to the C# #region keyword. And Visual Assist.NET doesn't bring this feature either.

              S Offline
              S Offline
              SteveKing
              wrote on last edited by
              #11

              you can try this[^] addin. It enables those #region keywords in the following way: //#region //#endregion that way (with the comment lines) the compiler is not confused...

              S 1 Reply Last reply
              0
              • S SteveKing

                you can try this[^] addin. It enables those #region keywords in the following way: //#region //#endregion that way (with the comment lines) the compiler is not confused...

                S Offline
                S Offline
                Stephane Rodriguez
                wrote on last edited by
                #12

                The VB macro used to track //#region //#end region sections is a smart workaround. Congrats! :) It remains probably static : from the VB code I believe that if you update the source code within the outlined section, then you have to apply the macro again.

                1 Reply Last reply
                0
                • B billb2112

                  In C# we have the collapsible (folding) text with the handy dandy #region directive to arbitrarily set a region to collapse. MS was nice enough to extend the folding abilities to C++ developers this time around, however, I don't seem to see any sort of equivalent to #region. Has anyone found this yet? Give me one more medicated peaceful moment

                  P Offline
                  P Offline
                  Paul Watson
                  wrote on last edited by
                  #13

                  A bit OT but does anyone know the hot key for opening and closing regions? I get frustrated when I am scrolling down with the keyboard and then have to switch to the mouse to open the region. ta

                  Paul Watson
                  Bluegrass
                  Cape Town, South Africa

                  Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er Shog9: Paul "The human happy pill" Watson

                  N 1 Reply Last reply
                  0
                  • P Paul Watson

                    A bit OT but does anyone know the hot key for opening and closing regions? I get frustrated when I am scrolling down with the keyboard and then have to switch to the mouse to open the region. ta

                    Paul Watson
                    Bluegrass
                    Cape Town, South Africa

                    Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er Shog9: Paul "The human happy pill" Watson

                    N Offline
                    N Offline
                    Nick Seng
                    wrote on last edited by
                    #14

                    Ctrl + M, M I live to serve :) Notorious SMC


                    The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                    Get your facts first, and then you can distort them as much as you please Mark Twain

                    P 1 Reply Last reply
                    0
                    • B billb2112

                      In C# we have the collapsible (folding) text with the handy dandy #region directive to arbitrarily set a region to collapse. MS was nice enough to extend the folding abilities to C++ developers this time around, however, I don't seem to see any sort of equivalent to #region. Has anyone found this yet? Give me one more medicated peaceful moment

                      T Offline
                      T Offline
                      Thomas Freudenberg
                      wrote on last edited by
                      #15

                      SteveKing has written an Addin which does the collapsing for VC++: http://www.codeproject.com/macro/KingsTools.asp[^] Regards Thomas


                      Disclaimer:
                      Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.

                      1 Reply Last reply
                      0
                      • T Topper Price

                        Sounds like you need to find an new profession. X|

                        M Offline
                        M Offline
                        Marc Clifton
                        wrote on last edited by
                        #16

                        Topper Price wrote: Sounds like you need to find an new profession Know thy enemy. Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
                        Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
                        Every line of code is a liability - Taka Muraoka
                        Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

                        1 Reply Last reply
                        0
                        • T Topper Price

                          Sounds like you need to find an new profession. X|

                          D Offline
                          D Offline
                          Daniel Turini
                          wrote on last edited by
                          #17

                          Topper Price wrote: Sounds like you need to find an new profession. Oh, you'll learn that programmers love to make the same mistakes again and again.


                          It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            Daniel Turini wrote: MS says that the next version of VS.NET (VS.NET 2004?) will have it Nothing like delivering a half completed product, is there? Keeps those MSDN subscriptions current and bucks rolling in, huh? Where's the damn competition when you need it? This is nothing more than a parsing issue! Oh, but wait. There's Intellisense. Or whatever it's called. The thing that keeps popping up with "try again in a few minutes after the system has loaded 50 megabytes worth of stuff" and the thing that gets in the way when I'm editing code, so I have to hit the damn ESC key because I can't get out of the popup window that has 20 different constructor options that I'm perpetually stuck scrolling through with the down arrow. I do believe I'm about to nuke that feature of the IDE. Daniel Turini wrote: This also helps when you want to create code generators Why do I get the impression that this is where programming is heading. Ummm. Again. (I remember going to some expo is SF when I was about 20, and some guy had a BASIC code generator that was supposed to mark the end of manual programming. That was 20 years ago. Here we go again, it seems. Oh, but wait! There's XML!!! :laugh: ) Daniel Turini wrote: If, at least .NET supported multiple inheritance, we could split the implementation between two or more files :rolleyes: Now there's the best use for multiple inheritence that I've heard of! Take that, you Java dogs! (OK, I'm in a flippant mood today). Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
                            Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
                            Every line of code is a liability - Taka Muraoka
                            Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

                            D Offline
                            D Offline
                            Daniel Turini
                            wrote on last edited by
                            #18

                            Marc Clifton wrote: Why do I get the impression that this is where programming is heading. Ummm. Again. (I remember going to some expo is SF when I was about 20, and some guy had a BASIC code generator that was supposed to mark the end of manual programming. That was 20 years ago. Here we go again, it seems. Oh, but wait! There's XML!!! ) I remember all those Clipper and DBase III code generators. I remember Genexus (hey, they are still alive and have a website!): define your forms and reports and Genexus generate the C++/Clipper/Basic code and a normalized database for you! People love to do the same mistakes again and again...


                            It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

                            1 Reply Last reply
                            0
                            • B billb2112

                              In C# we have the collapsible (folding) text with the handy dandy #region directive to arbitrarily set a region to collapse. MS was nice enough to extend the folding abilities to C++ developers this time around, however, I don't seem to see any sort of equivalent to #region. Has anyone found this yet? Give me one more medicated peaceful moment

                              N Offline
                              N Offline
                              Nick Hodapp
                              wrote on last edited by
                              #19

                              This is a feature we have planned for a future release; it will likely be implemented as "#pragma region". It didn't make the cut for 2003 (Everett). Nick This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved.

                              1 Reply Last reply
                              0
                              • N Nick Seng

                                Ctrl + M, M I live to serve :) Notorious SMC


                                The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                Get your facts first, and then you can distort them as much as you please Mark Twain

                                P Offline
                                P Offline
                                Paul Watson
                                wrote on last edited by
                                #20

                                Notorious SMC wrote: Ctrl + M, M Gee, thanks Notorious. Pressing Ctrl + M deletes the current line, and if that current line happens to be a hidden region it deletes the whole region. Like back on IRC when us ops used to tell annoying newbies that if they pressed Alt+F4 they could get op statues. :-D

                                Paul Watson
                                Bluegrass
                                Cape Town, South Africa

                                Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er Shog9: Paul "The human happy pill" Watson

                                N 1 Reply Last reply
                                0
                                • P Paul Watson

                                  Notorious SMC wrote: Ctrl + M, M Gee, thanks Notorious. Pressing Ctrl + M deletes the current line, and if that current line happens to be a hidden region it deletes the whole region. Like back on IRC when us ops used to tell annoying newbies that if they pressed Alt+F4 they could get op statues. :-D

                                  Paul Watson
                                  Bluegrass
                                  Cape Town, South Africa

                                  Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er Shog9: Paul "The human happy pill" Watson

                                  N Offline
                                  N Offline
                                  Nick Seng
                                  wrote on last edited by
                                  #21

                                  WTF?!?! ::Opens up VS.Net and tries Ctrl+M,M:: This works for me! Are you sure you did it right? press ctrl and M, then while still holding ctrl, press M again Notorious SMC


                                  The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                  Get your facts first, and then you can distort them as much as you please Mark Twain

                                  P 1 Reply Last reply
                                  0
                                  • N Nick Seng

                                    WTF?!?! ::Opens up VS.Net and tries Ctrl+M,M:: This works for me! Are you sure you did it right? press ctrl and M, then while still holding ctrl, press M again Notorious SMC


                                    The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                    Get your facts first, and then you can distort them as much as you please Mark Twain

                                    P Offline
                                    P Offline
                                    Paul Watson
                                    wrote on last edited by
                                    #22

                                    Notorious SMC wrote: ::Opens up VS.Net and tries Ctrl+M,M:: This works for me! Are you sure you did it right? press ctrl and M, then while still holding ctrl, press M again What keyboard mapping are you on? I am using Visual Interdev style. Remember I do C# in VS.NET, not C++ so the mappins maybe different. But as my VS.NET stands it definitley erases lines with Ctrl+M. p.s. Just checked VS.NET 2003 and Ctrl+M works in that, but not in VS.NET 2002. So thanks anyway.

                                    Paul Watson
                                    Bluegrass
                                    Cape Town, South Africa

                                    Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er Shog9: Paul "The human happy pill" Watson

                                    N 1 Reply Last reply
                                    0
                                    • P Paul Watson

                                      Notorious SMC wrote: ::Opens up VS.Net and tries Ctrl+M,M:: This works for me! Are you sure you did it right? press ctrl and M, then while still holding ctrl, press M again What keyboard mapping are you on? I am using Visual Interdev style. Remember I do C# in VS.NET, not C++ so the mappins maybe different. But as my VS.NET stands it definitley erases lines with Ctrl+M. p.s. Just checked VS.NET 2003 and Ctrl+M works in that, but not in VS.NET 2002. So thanks anyway.

                                      Paul Watson
                                      Bluegrass
                                      Cape Town, South Africa

                                      Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er Shog9: Paul "The human happy pill" Watson

                                      N Offline
                                      N Offline
                                      Nick Seng
                                      wrote on last edited by
                                      #23

                                      Paul Watson wrote: What keyboard mapping are you on? I am using Visual Interdev style :-O Okay, I think that's where I screwed up. I'm using the .Net Developer style. Sorry for the screw up But I'm sure you can customize the shortcuts yourself Notorious SMC


                                      The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                      Get your facts first, and then you can distort them as much as you please Mark Twain

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups