Copying winforms between projects in Visual Studio

后端 未结 18 2170
天涯浪人
天涯浪人 2020-12-13 18:16

What is the best way to copy or cut/past a form from one Project to another Project within a Solution in Visual Studio?

Whenever I try it, using the solution explore

18条回答
  •  不知归路
    2020-12-13 18:31

    1. Copy the three files, .cs, .designer, resx to the target solution folder.
    2. In the target project, select Add existing item and add the designer file first.
    3. Modify the Namespace attribute. The .cs file should come in as well.
    4. Modify the namespace in the .cs file.
    5. Add the resx file using Add existing item.

提交回复
热议问题