How to easily duplicate a Windows Form in Visual Studio?
I usually copy the files in windows explorer, open them up in Notepad/Wordpad and just change the one mention of the class name at the top. Include those files in your project, and you'll be good to go.
Secured way without problems is to make Template of your form You can use it in the same project or any other project. and you can add it very easily, such as adding a new form . Here's a way how make Template
1- from File Menu click Export Template
2- Choose Template Type (Choose item template ) and click next
3-Check Form that you want to make a template of it, and click next Twice
4-Rename your template and (put describe , choose icon image ,preview image if you want)
5-click finish
Now you can add new item and choose your template in any project
- Copy and paste the form.
- Rename the pasted form .cs to match the new form class name. This should auto rename other related files.
- Open up .cs file. Change the class name and the name of the constructor(s) and destructor.
- Open up .Designer.cs file and change the class name.
Extra Credit:
- Consider abstracting common functionality from the form into common form or controls.