I need to make a copy of my already made form instead of adding new. I tend to do this by copy/paste the controls and manually setting the location. Is there any other way to do this?

Recommended Answers

All 3 Replies

If the forms are identical with the same functionality, you can just create a new instance of the form.

Form1 form1 = new Form1();
Form1 form2 = new Form1();

My form1 uses same labels and textbox, but the form1 is for adding of data and form2 is for editing data.

You can copy/paste the source files and just edit the class name. Then add this to the project and you should be good to go.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.