Just add a new Winform, add the following code to your Main
:
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Also, be sure the [STAThread]
attribute is declared above your Main
function to indicate the COM threading model your Windows application will use (more about STAThread here).
Then right click your project and select properties and change the "Output type" to Windows application and you're done.
EDIT :
In VS2008 the property to change is Application type
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…