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. General Programming
  3. C#
  4. Visual Studio 2005 Question

Visual Studio 2005 Question

Scheduled Pinned Locked Moved C#
questioncsharpvisual-studiodesignlearning
8 Posts 3 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.
  • R Offline
    R Offline
    rittjc
    wrote on last edited by
    #1

    I have a question that I hope somebody has figured out. Visual Studio 2005 is definately a productive environment, that goes without saying, but there are a occasionally annoyances that you wonder what they were thinking. My annoyance question is how do you cause double-click to "View Code" in solution explorer rather than "View Designer". I have been using the environment for about three years now and I can't and I still can't get used to this being the default option. Its not that it is such a big deal in and of itself but I am forever double-clicking to edit the code and then I get the designer that I didn't want, which I have to close and then reopen the same node with "View Code". Double click is instinctive for open so I don't use the buttons. Is there a way to change the option to open in "View Code" when double clicking? I (like most probably) have a 10:1 ratio of editing code versus UI. There are times you want to edit the forms/controls, of course, but, that is the exception. Anyone know a way to change this? Is it possible? Thanks, Jim

    C E 2 Replies Last reply
    0
    • R rittjc

      I have a question that I hope somebody has figured out. Visual Studio 2005 is definately a productive environment, that goes without saying, but there are a occasionally annoyances that you wonder what they were thinking. My annoyance question is how do you cause double-click to "View Code" in solution explorer rather than "View Designer". I have been using the environment for about three years now and I can't and I still can't get used to this being the default option. Its not that it is such a big deal in and of itself but I am forever double-clicking to edit the code and then I get the designer that I didn't want, which I have to close and then reopen the same node with "View Code". Double click is instinctive for open so I don't use the buttons. Is there a way to change the option to open in "View Code" when double clicking? I (like most probably) have a 10:1 ratio of editing code versus UI. There are times you want to edit the forms/controls, of course, but, that is the exception. Anyone know a way to change this? Is it possible? Thanks, Jim

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      It's possible to set up the preferences to view code and not designer for web pages, perhaps that option is in there as well. I am quite used to right clicking and hitting 'view code', tho. You can also set the solution explorer to show the .cs file under the designer file like a tree view, then you can select the file you want and double click on it.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      R 1 Reply Last reply
      0
      • C Christian Graus

        It's possible to set up the preferences to view code and not designer for web pages, perhaps that option is in there as well. I am quite used to right clicking and hitting 'view code', tho. You can also set the solution explorer to show the .cs file under the designer file like a tree view, then you can select the file you want and double click on it.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        R Offline
        R Offline
        rittjc
        wrote on last edited by
        #3

        Hi Christian, I don't see a place to do that with the C# editor. So its obvious that Microsoft realizes there a is a preference between the code/design views. Double clicking has always opened CPP files, including dialog and control files in the old VS's. Of course they were separated in those days. It was a good idea to integrate them into Solution Explorer. I am hoping there is a registry settings or something if not comprehended in the Options. I figure it was an oversight. Of course this is not "earth-shattering", I mean all you have to do is right click and navigate down the menu, its just an annoyance when you are deep in concentration. Jim

        C 1 Reply Last reply
        0
        • R rittjc

          Hi Christian, I don't see a place to do that with the C# editor. So its obvious that Microsoft realizes there a is a preference between the code/design views. Double clicking has always opened CPP files, including dialog and control files in the old VS's. Of course they were separated in those days. It was a good idea to integrate them into Solution Explorer. I am hoping there is a registry settings or something if not comprehended in the Options. I figure it was an oversight. Of course this is not "earth-shattering", I mean all you have to do is right click and navigate down the menu, its just an annoyance when you are deep in concentration. Jim

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Show all files is in the solution explorer, but while that helps for ASP.NET, it doesn't seem to help for winforms. Perhaps there isn't a way ?

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          R 1 Reply Last reply
          0
          • C Christian Graus

            Show all files is in the solution explorer, but while that helps for ASP.NET, it doesn't seem to help for winforms. Perhaps there isn't a way ?

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

            R Offline
            R Offline
            rittjc
            wrote on last edited by
            #5

            You just may be right. Bummer...

            1 Reply Last reply
            0
            • R rittjc

              I have a question that I hope somebody has figured out. Visual Studio 2005 is definately a productive environment, that goes without saying, but there are a occasionally annoyances that you wonder what they were thinking. My annoyance question is how do you cause double-click to "View Code" in solution explorer rather than "View Designer". I have been using the environment for about three years now and I can't and I still can't get used to this being the default option. Its not that it is such a big deal in and of itself but I am forever double-clicking to edit the code and then I get the designer that I didn't want, which I have to close and then reopen the same node with "View Code". Double click is instinctive for open so I don't use the buttons. Is there a way to change the option to open in "View Code" when double clicking? I (like most probably) have a 10:1 ratio of editing code versus UI. There are times you want to edit the forms/controls, of course, but, that is the exception. Anyone know a way to change this? Is it possible? Thanks, Jim

              E Offline
              E Offline
              Ed Poore
              wrote on last edited by
              #6

              Try opening the .csproj file in a text editor, you will see that it's an xml file.  All compilable .cs files are included inside COMPILE tags.  If you expand this tag you can modify it such that it looks something like this:

              <Compile Include="MainForm.cs">
                  <SubType>Code</SubType> or <SubType>Designer</SubType>
              </Compile>

              This may do what you want, but I've had occasions where VS has overwritten the changes I've made. TIP: It's quite nice if you've got partial classes to group them as VS does for Forms etc, just add the <DependentUpon>MainFile.cs</DependentUpon> tag inside the Compile tag and voila you have all partial classes underneath the main node of representing the class in Solution Explorer :cool:


              As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it

              R 1 Reply Last reply
              0
              • E Ed Poore

                Try opening the .csproj file in a text editor, you will see that it's an xml file.  All compilable .cs files are included inside COMPILE tags.  If you expand this tag you can modify it such that it looks something like this:

                <Compile Include="MainForm.cs">
                    <SubType>Code</SubType> or <SubType>Designer</SubType>
                </Compile>

                This may do what you want, but I've had occasions where VS has overwritten the changes I've made. TIP: It's quite nice if you've got partial classes to group them as VS does for Forms etc, just add the <DependentUpon>MainFile.cs</DependentUpon> tag inside the Compile tag and voila you have all partial classes underneath the main node of representing the class in Solution Explorer :cool:


                As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it

                R Offline
                R Offline
                rittjc
                wrote on last edited by
                #7

                Ed, These are good suggestions. What you have illustrated is what I wanted. The only problem is that VS 2005 converts them on open so that they are whatever type it can recognize from the file's internal data. If it sees the InitializeComponent then it converts it to a component. But that would probably do what I am looking to do. Thanks for the suggestions. Jim

                E 1 Reply Last reply
                0
                • R rittjc

                  Ed, These are good suggestions. What you have illustrated is what I wanted. The only problem is that VS 2005 converts them on open so that they are whatever type it can recognize from the file's internal data. If it sees the InitializeComponent then it converts it to a component. But that would probably do what I am looking to do. Thanks for the suggestions. Jim

                  E Offline
                  E Offline
                  Ed Poore
                  wrote on last edited by
                  #8

                  I was thinking of writing an add-in which would allow this but I don't have a copy of VS so I can't :sigh:.  Maybe in a few months if I buy a copy :rolleyes:


                  As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it

                  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