Visual Studio 2005 Question
-
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
-
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
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
-
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
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
-
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
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
-
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
-
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
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 theCompile
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
-
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 theCompile
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
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
-
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