Click here to Skip to main content
15,917,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am creating Windows based application in c#, when i add existing form in it(which is developed in another machine) then i will not able to create that form object to run that winform.
Please help me...............
Posted
Comments
Dasaradhi_r 29-Aug-12 3:12am    
Make sure the namespace is same/Use full name space of the form to create the form object..

Hi Dear,

do one thing,

check the namespace of the added form

Or

create a new file and copy the existing code then run.
 
Share this answer
 
Better to create new file and copy code from existing file and paste into the created file...
 
Share this answer
 
You can do it,the step will be-
Open ur Solutin explorer where u want to add form->right click on ur project name->Add->Existing Item->Select ur project file from where u want to add form->select form name from ur existing project->Add

Done!
One thing u should remember that the form name should be different in your project where u r working and the project from where u want to add form.
 
Share this answer
 
Comments
fjdiewornncalwe 29-Aug-12 10:00am    
Please avoid the txtspeak here.
Hey there...

The above solutions should solve your problem.
Another work around would be to add a using statement:
using + the namespace of the existing item you just added.

If you getting a designer loading error, go the the forms.designer.cs
and check some of the code, i.e: a picture box image referencing an image
in your old solution which is not in your current solution or event handlers etc....

Good luck :)
 
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