For Programmers: Free Programming Magazines  


Home > Archive > MSDN > 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, 6:57 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.
Richard Morton

2006-01-17, 6:57 pm

Hi Schwaney,

VS.net 2005 does things a little differently. Instead of embedding the UI
display code in the main class for the form, it instead uses partial classes
to hide it away in a different file.

To view the UI code, first go to the solution explorer dockable window and
ensure that the 'show all files' toolbar button is selected. You should then
be able to expand the 'form1' node in the solution explorer window to see a
file called 'form1.designer.vb'. This is where the UI designer code now
lives.

VS 2005 uses this approach for new projects or new forms created in upgraded
2003 projects, but if you have a project you upgrade from VS 2003, the
upgraded forms use the old inline approach.

Hope it helps,
Richard.


"schwaney" <schwaney@discussions.microsoft.com> wrote in message
news:42243D53-6DD3-42CE-B330-0C1A1C61B629@microsoft.com...
> 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.



schwaney

2006-01-17, 9:55 pm

That was perfect. Thanks Richard.
Sponsored Links







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

Copyright 2008 codecomments.com