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

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

在Visual Studio 2012 選擇CLR Empty Project

Project –> Add New Item

Click UI and select Windows Form

Myform UI will be created

Click WindowsForm2012

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

程式入口點Entry Point輸入main 

點選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: }

編譯程式

文章標籤
全站熱搜
創作者介紹
創作者 me1237guy 的頭像
me1237guy

天天向上

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