出現這種錯誤時,請在MyForm.cpp內加入
#include "MyForm.h"
using namespace Test_UI(your namespace name);
[STAThreadAttribute]
int main(void)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
//Application::
// 建立主視窗並執行
Application::Run(gcnew MyForm());
return 0;
}