I have a Project in which there is a form that has several objects (controls) in itself. I want to add this form to another Project in another Solution. How to I can do this. Thanks.
Right-click on the project and choose Add > Form (Windows Forms). In the Name box, type a name for your form, such as MyNewForm. Visual Studio will provide a default and unique name that you may use.
Select Visual Studio menu Project -> Add Existing Item... Then select (browse) in the file dialog the Form. cs (Form = name of the form) you want to add to the project and the form (with all associated files) is (copied and) added to your project.
Right click on your project file in Solution Explorer and choose Add -> Existing Item. Show activity on this post. You need to copy all the files. You should even be able to open two instances of Visual Studio and drag and drop the form from one to the other.
You mean you have an Form in your Project and you want to add it to another Project in some other Solution. If this is the case then.
It will be copied to your local Solution Project Folder with every thing in it (including designer.cs and resource files).
Just after adding the Form's ".cs" file you may only see the Form.cs not the Design view. Just open the File in code editor and the Visual Studio will automatically draw the Form in Designer for Design Support.
This operation will add the Files as a Copy. They will be independent to the changes to the Original Form. If you want to have changes then add it as a Link. (Select Add as Link in the Add Existing Item Dialog Box)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With