Visual Studio 2015 年 Windows 表格申请工具箱

Visual Studio 2015 Toolbox for Windows Form Application

我是 C++ 新手,我正在尝试创建 Windows 表单应用程序,但工具箱不起作用,所以我做错了什么。

  1. "CLR Empty Project".
  2. Windows表格(在UI下)。
  3. CPP 文件内:
#include "MyForm.h"
using namespace System;
using namespace System::Windows::Forms;
    [STAThread]
    void main(array<String^>^ args) 
    {
        Application::EnableVisualStyles();
        Application::SetCompatibleTextRenderingDefault(false);
        MYPROG::MyForm form;
        Application::Run(%form);
    }
  1. 在解决方案资源管理器属性条目中指向 "main"
  2. 子系统到 "Windows (/SUBSYSTEM/WINDOWS)"
  3. 构建 MYPROG
  4. 打开MyForm.h
  5. 打开工具箱,右键单击并按 "Show All",添加 MyForm 上的按钮

But the tools does not works, looks like this

你能帮我解决这个问题吗

您的项目可能是 RUNNING。因此 STOP 项目然后您的工具栏项目将变为 "enabled"。

如果我猜错了。然后右键单击工具箱项和 Reset Toolbox。然后他们会得到"enabled"。

注意您可能会丢失您添加的任何自定义控件。