How to easily duplicate a Windows Form in Visual Studio?

前端 未结 14 1437
梦谈多话
梦谈多话 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:12

    Just rename the class the designer references.

    But a better solution is to create a new instance of the same class at run time.

    Or better yet, create a parent form that various implementations inherit from.

提交回复
热议问题