How to easily duplicate a Windows Form in Visual Studio?

前端 未结 14 1420
梦谈多话
梦谈多话 2021-01-30 21:03

How can I easily duplicate a C#/VB Form in Visual Studio? If I copy & paste in the Solution Explorer, it uses the same class internally and gets messed up. How do you do it?

14条回答
  •  伪装坚强ぢ
    2021-01-30 21:33

    1. Right-Click on Form -> Copy Class

    1. Right click on destination Folder and Paste Class

    1. Rename new Form and say yes to renaming all references to this class.

提交回复
热议问题