Winforms C++包含第二种形式

Winforms C++包含第二种形式,winforms,visual-studio,c++-cli,Winforms,Visual Studio,C++ Cli,我试过了,但我有个问题 表格1.h panel^ form2 = gcnew panel; form2->ShowDialog(); 小组.h #include "Form1.h" 表1.cpp和panel.cpp #include "Form1.h" #include "panel.h" 错误 似乎您还没有包括面板的标题。 包括声明面板类型的标题和编译代码。 所有错误都是由于缺少面板声明造成的对不起,面板是第二个表单Form2的名称。修正了。我仍然建议你在面板类中声明标题文件。请参

我试过了,但我有个问题

表格1.h

panel^ form2 = gcnew panel;
form2->ShowDialog();
小组.h

#include "Form1.h"
表1.cpp和panel.cpp

#include "Form1.h"
#include "panel.h"
错误


似乎您还没有包括面板的标题。 包括声明面板类型的标题和编译代码。
所有错误都是由于缺少面板声明造成的

对不起,面板是第二个表单Form2的名称。修正了。我仍然建议你在面板类中声明标题文件。请参阅参考文献:我有这个错误:C2039:“Studio对话”:不是“Panel”的成员。你是否宣布StPudio作为面板类的成员??我不知道管理C++,但是我还是会尝试向你推荐一些类似下层面板的东西。{ShowDialog;};
 error C2061: syntax error : identifier 'panel' 
 error C2065: 'form2' : undeclared identifier
 error C2065: 'form2' : undeclared identifier
 error C2065: 'panel' : undeclared identifier
 error C2227: left of '->ShowDialog' must point to class/struct/union/generic type