Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have designed a Winform Form, lets say Form1.h. I can switch to its Form designer and drop components etc. Now, if i insert this Form1.h in a different solution/project, i can compile, call the Form, but i cannot switch to the form designer. It's like a plain .h file. How can i make VS2008 understand that this is a form, so that i can edit it visually?

I'm using VS2008 C++/CLR.
Thanks
Posted

1 solution

I ran into a similar problem not long ago (using VS2005 Pro). Here's how I solved it

1. In the project you want a copy of the Form1, simply add a new Form object. Be sure to call it Form1 was well (or whatever you called it in your original project).
2. Delete the .h and .cpp files for the form you just created. Leave the .resx file alone.
3. Copy Form1.h and Form1.cpp from your original project to your new project and compile. Be sure to rename them to whatever you called the form you just deleted. Since your copied form is now the same name, it should work just fine.

I'm not certain if this is exactly what I did, but I have it documented at work. I can check on it Monday.

Dybs
 
Share this answer
 


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