Author Topic: Conversion of VB.Net Forms  (Read 3067 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Conversion of VB.Net Forms
« on: March 12, 2008, 07:46:14 PM »
I have a project written using .NET 1.1 and VB 2003, when I opened the project in VB 2008 (and also in VB 2005) it converts the program to the newer version, with a few minor hiccups that are easily corrected ... with the exception of one. When the forms were converted, the .designer.vb files for the forms were deleted, although I still have the .resources object file. The program compiles perfectly well in VB 2008 since I still have the .resources file, except I cannot edit the forms. Any attempt to view the forms generates about 500 errors, due to the missing designer.vb files.

I was able to recreate the .resx files by reverse engineering the .resource files using resgen.exe, but I cannot seem to find a method (at least not in the MSDN) to recreate the designer files.

So, I am hoping that some kind soul has some magic bullet that will let me recreate these files so I can update some of the controls.

Please tell me there is a way, I don't want to have to recreate the forms with the 100 or so controls on each ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

sinc

  • Guest
Re: Conversion of VB.Net Forms
« Reply #1 on: March 13, 2008, 08:21:41 AM »
That's strange.  I haven't used 2003, but I had no such issues when I went from 2005 to 2008.

Did you try just going back to your 2003 project and getting the designer files from there, then adding them to your 2008 project?  I don't think anything changed in them between the two versions...  I know there were no changes in the designer files between 2005 and 2008, anyway.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Conversion of VB.Net Forms
« Reply #2 on: March 13, 2008, 08:47:35 AM »
Upon further research, I am told that there were no designer.vb files in VB 2003 ... that the code that builds the form was included in the form.vb file ... Ok .. I can see that .. I actually can .. it is there ... but I still cannot edit or see the form in the designer window ... so, I thought I would be slick .. I added a new form, saved the project, cut the info out of the form.vb file and pasted it into the added form.designer.vb file ... then renamed the file, and changed the partial name to point to the correct form ..

Great!! NOT ... when I open the project, I can now view the form ... but the controls are missing .. even though they show up in the designer ...

Oh well .. perhaps I will have to recreate the damn thing.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ReneRam

  • Guest
Re: Conversion of VB.Net Forms
« Reply #3 on: March 13, 2008, 10:24:39 AM »
Maybe it's a bit long, but i had a similar problem a few controls (the MenuStrip) and solved the issue adding all the necessary lines in the designer. It was a damned annoying work but at the end I rebuilt the components and the p.ogram works fine.

sinc

  • Guest
Re: Conversion of VB.Net Forms
« Reply #4 on: March 13, 2008, 11:01:52 AM »
No idea if this will work...

You say you can see all the buttons in Forms Designer?  What happens if you select all of them, copy to clipboard, then paste all the controls into a brand-new form?

sinc

  • Guest
Re: Conversion of VB.Net Forms
« Reply #5 on: March 13, 2008, 11:04:57 AM »
Oops, now that a re-read your post more-carefully, I see that you initially can NOT see things in Designer...

How about this?  Can you open your 2003 project (in VS 2003), select all the controls there and copy to clipboard, then paste them into a new form in your 2008 project (in VS 2008)?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Conversion of VB.Net Forms
« Reply #6 on: March 13, 2008, 11:15:53 AM »
Oops, now that a re-read your post more-carefully, I see that you initially can NOT see things in Designer...

How about this?  Can you open your 2003 project (in VS 2003), select all the controls there and copy to clipboard, then paste them into a new form in your 2008 project (in VS 2008)?

No longer have VS 2003 installed ... hell I dunno if it would work or not ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie