close

在之前Visual Studio 2010, 可以找到Windows Form應用程式

image

但是, 在新版Visual Stuio 2012竟然找不到!

在Visual Studio 2012 選擇CLR Empty Project

image

Project –> Add New Item

image

Click UI and select Windows Form

image

Myform UI will be created

image

Click WindowsForm2012

image

image

image

image

準備設定程式入口點<Entry Point>

image

程式入口點Entry Point輸入main 

image

點選MyForm.cpp, 輸入下列程式碼

   1: #include "MyForm.h"
   2: using namespace System;
   3: using namespace System::Windows::Forms;
   4:  
   5:  
   6: void main( void )
   7: {
   8:     WindowsForm2012::MyForm myForm;
   9:     Application::Run(%myForm);
  10: }

編譯程式

image

arrow
arrow
    全站熱搜

    me1237guy 發表在 痞客邦 留言(0) 人氣()