Sunday, April 3, 2011

Adding Existing Form to C++/CLI WinForms Project

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?

From stackoverflow
  • Got it!

    1. Open the Solution Explorer pane and the Properties pane side-by-side.
    2. Select the header file for the form class in the Solution Explorer pane.
    3. 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.

  • thanks man! spent the last 2 hours on that!

0 comments:

Post a Comment