Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VS 2005 and VS 2003 Form generated code

Status
Not open for further replies.

TonyScarpelli

Programmer
Jan 23, 2003
361
US
In VS 2003 the form's generated code was in a Region called "Windows Form Designer generated Code" in the same file as the code behind: MyForm.vb.

In VS 2005 this is now in a separate file: MyForm.Designer.vb

Is there a way to get the old form designer code into the new format?

Thanks.


Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
Yep, you can easily do it yourself.

if you mean that your old forms should be transfered to vs2005. You can't do this in VS2003.

Or do what tipgiver says.

Christiaan Baes
Belgium

"My new site" - Me
 
In Visual Studio 2003, when you created a Form, and put controls on the form, the form's control's code was put into a Region called "Windows Form Designer generated Code".

This code, and any other code like subs and functions, were all in the same file, for example: MyForm.vb.

In Visual Studio 2005, all the control's code is in a separate file. So if you open up the Solution Explorer you see not only MyForm.vb, but there is another file called MyForm.Designer.vb. This is where all the control's code is.

I have some 2003 applications that I am converting to 2005. When you convert them the converter doesn't separate the form files, the code is _still_ in one file.

What I want to know is this: how do I take all the form controls code from the one file and move them to the second Designer file?

Can this be done?

Is there something other than just creating a Designer file and moving the code to it?

Has anyone done this?

Thanks.

Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
No there is nothing else to it. the designer is a parial class. Just look how they do it. All the code is there for you to see.

Christiaan Baes
Belgium

"My new site" - Me
 
Thanks, I'll give it a try.

Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top