|
-
Jun 5th, 2006, 04:53 PM
#1
Thread Starter
Member
Question regarding the default breakdown of form code (designer, etc.)
I noticed in some example files that the form.Designer code is embedded into the form's source code, rather than put as a shortcut of some sort inside the form (hard to explain, but I'm sure you know what I mean).
Is there an option I can enable in VS2005 that does this by default? I like having the Designer code in the form's code, simply because it's 1 less open file in the IDE. I looked around everywhere with no luck.
Is this just something that occured in previous versions of VS that they changed in 2005?
-
Jun 5th, 2006, 08:50 PM
#2
Re: Question regarding the default breakdown of form code (designer, etc.)
No you can't. You shouldn't have the designer file open in the IDE anyway. There are some instances where you may need to edit the designer file by hand but they are very, VERY few and far between. The designer file is automatically regenerated each time you make changes in the designer so generally any changes you make there will be lost almost immediately anyway. The only valid reasons to have that file open are if you want to inspect the code to learn something or if the IDE has buggered something up and you need to change it in order to get your form back to working order. In the general day to day you shouldn't have anything to do with that file. Why do you have it open, by the way?
-
Jun 6th, 2006, 09:55 AM
#3
Thread Starter
Member
Re: Question regarding the default breakdown of form code (designer, etc.)
I don't keep it open.
It's just annoying having to open another window, wait for it to load, and then hunt down whatever I was going in there to do when it could be avoided by placing the code in a region somewhere in the form's main code file.
Most of the time the reason I go in there is if I manually deleted an event for a control. In and out in a few seconds usually, removing the reference to the event.
-
Jun 8th, 2006, 03:15 PM
#4
Re: Question regarding the default breakdown of form code (designer, etc.)
That's the way VS 2005 is. Ideally, when you're coding, you shouldn't really need to be going into the designer anymore. That's one of the benefits of Partial Classes, they can place the designer code in another file. In fact, in ASP.NET, the 'designer' code is generated at runtime.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|