How do i display the windows form designer generated code


I have just moved to Visual Studio 2005 (from VS 2003) and have "succesfully" opened an existing VB.NET project up. The forms display correctly (with all buttons, panels etc in the right place, but in the code I can not see the "Windows Form Designer Generated Code".

Has something gone wrong or is there a menu option, that I have not found, to display this region of code ?

This is very urgent, hence the 500 points.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fernando SotoRetiredCommented:
Hi swtiley,

No you did not do anything wrong, they move that code to a file called "FormName".Designer.vb where "FormName is the name of the Class/Form.

I hope that this was of some help.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fernando SotoRetiredCommented:

At the top of this file the first couple of lines will look something like:

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Class1
    Inherits System.Windows.Forms.Form

swtileyAuthor Commented:
Hi Fernando,

thank you so much for the quick reply, and you can have the points, as I have found the file from your directions.

As a follow up question,  can you please tell me where I put my initialization code that was previously placed after the InitalizeComponent() ?

I believe in VS 2003. there was a comment line that said "Add any initialization afer the InitializeComponent() Call"

Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Fernando SotoRetiredCommented:
Hi swtiley,

I do not know foe sure but I think that was move to

My.Application.Startup event Look at this link for the information. tTodisplay this event handler goto Project on the main menu and select the project name Properties, last selection on the menu. Click on application on the left hand side and then click on View Applications Events button at the buttom of the page.

I hope that this helps.

swtileyAuthor Commented:
Thanks Fernando
Fernando SotoRetiredCommented:
No problem, have a great day.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.