Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Have two Projects .
First project contain 3 forms. Form Names ExpensForm,SaleForm,ProfitForm
Now i want to add the ExpensForm in my Second Project.
using C# on Visual studio 2017
How can i do this Please Tell me in detil.
Im Bigner in Parograming .
Thanks in Advance.

What I have tried:

I have no idea How can i do this
Posted
Updated 17-Mar-18 4:52am

Add a reference to the first project to your second: right click the project name in the Solution Explorer pane, and select "Add...Reference" to bring up teh References dialog. Then add the EXE or project to the references.
Then add a using line to your .CS file to include the project namespace.
You can now treat forms from the first project as if they were part of your second.
 
Share this answer
 
If you want to use an independent (= change one form does not change the other form) copy of the form:

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900