Copying winforms between projects in Visual Studio

后端 未结 18 2169
天涯浪人
天涯浪人 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:36

    For Visual Studio V.12 this is the only method which worked for me (It is a mix of above entries):

    • Copy through Files Explorer the three files that the form is made up.
    • At the top bar of the solution explorer in Visual Studio, turn on "show all files" .
    • The file.cs file appears in grey. Click right-button and select: "Include in Project". The solution explorer automatically links the three file (.designer and .resx under .cs file). The file.cs change icon to from c++ to form icon.

提交回复
热议问题