将现有表单添加到C ++/CLI WinForms项目 [英] Adding Existing Form to C++/CLI WinForms Project

查看:123
本文介绍了将现有表单添加到C ++/CLI WinForms项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在单独的解决方案中有两个C ++/CLI项目A和B.我使用A进行实验/测试,并在完成测试后将经过测试的代码移至B.但是,我发现在将Windows窗体类(标头,cpp和resx)添加到项目B时,我不再能够使用IDE的可视窗体设计器.如何启用该功能?

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?

推荐答案

知道了!

  1. 打开解决方案资源管理器"窗格,然后 属性"面板并排显示.
  2. 选择表单的头文件 类在解决方案资源管理器"窗格中.
  3. 在属性窗格中,选择"C ++ 表格"下的文件类型" 财产.
  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.

这篇关于将现有表单添加到C ++/CLI WinForms项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆