Adding an existing form to a C ++ / CLI WinForms project

I have two C ++ / CLI projects A and B in separate solutions. I use A for experimentation / testing and move the verified code to B after testing is complete. However, I find that when I add the Windows form class (title, cpp and resx) to project B, I can no longer use the visual form designer of the IDE. How to enable this?

+6
visual-studio-2008 visual-studio winforms c ++ - cli
source share
1 answer

Got it!

  • Open the Solution Explorer panel and the Properties panel side by side.
  • Select the header file for the class form in the Solution Explorer pane.
  • In the properties panel, select the "C ++ Form" in the "File Type" property.

The form icon next to it will now appear in the header file and open in the form editor with a double click.

+7
source share

All Articles