For Programmers: Free Programming Magazines  


Home > Archive > Visual Studio > January 2006 > Can't see #Region Windows Form Designer generated code









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Can't see #Region Windows Form Designer generated code
schwaney

2006-01-16, 7:05 pm

For some reason I am no longer able to see the 'Windows Form Designer
generated code' section on any new Project that I start. To test, all I am
doing is starting a Visual Studio 2005 VB Windows Application with a single
form. When I view the code for the form the above section is no longer
visible. This is the case regardless of how many controls I add. I have
looked everywhere (I think) for a setting that controls this, but no joy.
Thanks for any help.

nifsmith

2006-01-16, 7:05 pm

schwaney wrote:
> For some reason I am no longer able to see the 'Windows Form Designer
> generated code' section on any new Project that I start. To test, all I am
> doing is starting a Visual Studio 2005 VB Windows Application with a single
> form. When I view the code for the form the above section is no longer
> visible. This is the case regardless of how many controls I add. I have
> looked everywhere (I think) for a setting that controls this, but no joy.
> Thanks for any help.
>

Can't speak for VB but in C# a Windows form is a partial class. Choosing
to "view code" from within the designer shows only part of the class. VS
generated code is "hidden" in the other part of the partial class.
Clicking "show all files" will reveal this file which will be called
Form1.Designer.cs where "Form1" is the name of your form.
schwaney

2006-01-16, 7:05 pm

Thank you for that. That answers my question. I guess the reason I could
see it all in the Form1.vb code of other projects is because I upgraded them
from VS.NET 2003. One more question. Where is the Show All Files option? I
did find the Form1.Designer.vb code, but only by doing a QuickFind on a
control name that I knew should be in there. These Partial classes certainly
make thing tidier :-).


schwaney

2006-01-16, 7:05 pm

Thanks mate. I have founfd the 'Show All Files' option. Thanks again.

"nifsmith" wrote:

> schwaney wrote:
> Can't speak for VB but in C# a Windows form is a partial class. Choosing
> to "view code" from within the designer shows only part of the class. VS
> generated code is "hidden" in the other part of the partial class.
> Clicking "show all files" will reveal this file which will be called
> Form1.Designer.cs where "Form1" is the name of your form.
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com