Form Copying (VB.Net 2005)

  • Thread starter Thread starter johnb
  • Start date Start date
Right Click on the Form, click Copy. Repeat Right Click and click Paste?

Easy enough? Even easier, click on the form, then Ctrl-C, Ctrl-V.

Cheers,
 
Cheers for the responce Anil. Er...Right clicking on the Form gives me "View
Code", "Lock controls" and "Properties" and right clicking on the Form in
the Solution Explorer give copy but no Paste.

Were it so simple I'd should have worked it in this rusty old brain of mine.
I believe there is a load of hidden code that gets regenerated on each
rebuild which refers back to the original form. And this where I'm lost
 
Hi All
How do I copy a Form within a project?

TIA

johnb

Depending on the Form, you might just want to abstract things back and
follow an inheritance model.

Thanks,

Seth Rowe [MVP]
 
Cheers for the responce Anil.  Er...Right clicking on the Form gives me"View
Code", "Lock controls" and "Properties" and  right clicking on the Formin
the Solution Explorer give copy but no Paste.

Were it so simple I'd should have worked it in this rusty old brain of mine.
I believe there is a load of hidden code that gets regenerated on each
rebuild which refers back to the original form. And this where I'm lost

Personnally, I never trusted copy and pasting a form to reproduce it.

My standard model is to add a new form object, and copy / paste the
controls and code behind from the old form into the new one. The bad
thing is that you'll still need to set the form properties manually.

Thanks,

Seth Rowe [MVP]
 
Back
Top