2016/06/17

How to create windows forms application using visual studio 2015 c++ ?


  1. Create new project: CLR Empty Project ?
  2. Add new item: UI -> Windows Form
  3. Set this options in project properties: Configuration Properties -> Linker -> System -> SubSystem -> WINDOWS (/SUBSYSTEM:WINDOWS); Configuration Properties -> Linker -> Entry Point: main
  4. Your form .cpp file you should look like this:

    -------------------------------------------------------------
    #include "MyForm.h"

    using namespace System;
    using namespace System::Windows::Forms;

    [STAThread]
    void main(array^ args)
    {
       Application::EnableVisualStyles();
     Application::SetCompatibleTextRenderingDefault(false);
     mach2gamessnake::MyForm form;
     Application::Run(%form);
    }
    -------------------------------------------------------------

No comments:

Post a Comment