窗口应用程序
using System;using System.Windows.Forms;
using System.Drawing;
public class HelloWorldForm : System.Windows.Forms.Form
{
public HelloWorldForm()
{
this.ClientSize = new System.Drawing.Size(200, 180);
this.Name = "HelloWorldForm";
this.Text = "HelloWorldForm";
this.Paint += new System.Windows.Forms.PaintEventHandler(this.HelloWordlForm_Paint);
}
static void Main()
{
Application.Run(new HelloWorldForm());
}
private void HelloWorldForm_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.DrawString("Hello, world",
new Font("Curior New", 12f),
new SolidBrush(Color.Blue),
50f, 100f, null);
}
}
用这段代码创建一个窗口应用程序,具体的过程是什么啊?VS和VC的环境不一样啊,在创建的工程的时候应该选择Windows应用程序吧,但是这样也不能执行的,谁帮帮说一下具体的创建过程是怎么弄的,谢谢了