I have two C++/CLI projects A and B in separate solutions. I use A for experiments/testing and move the tested code to B once I am finished testing. However, I find that on adding a windows forms class (header, cpp and resx) to project B, I am no longer able to use the visual forms designer of the IDE. How do I enable that?
Got it!
- Open the Solution Explorer pane and the Properties pane side-by-side.
- Select the header file for the form class in the Solution Explorer pane.
- In the properties pane, select "C++ Form" under the "File Type" property.
The header file will now display a form icon next to it's name and will open in the form editor when double clicked.
来源:https://stackoverflow.com/questions/584881/adding-existing-form-to-c-cli-winforms-project