Click here to Skip to main content
15,914,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi


I Was add existing project ;
but I cant Use the form in main project

Can you help me
Posted

Reference the new project in the main project then call the form in the new project using the full namespace from your main project.

C#
newproject.newform f = new newproject.newform();// code in the main project
 
Share this answer
 
v2
Add a reference to the added project in the References section of the Solution Explorer pane of the old project:
Right click the References secrtion and select "Add new reference".
When the dialog comes up (and it can take a while) select the "Projects" tab
Highlight the added project and select OK.
In your old project code, type the name of the form from the added project. A small red line will appear at the end.
Hover the mouse over the line, open the dropdown when it appears, and select to add the "using" statement.
 
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