这是个最简单的演示事件的小程序,请问在VS2005里怎么运行,我试了新建控制台应用程序和新建Windows应用程序都不行,都报错.但程序本身没错。
using System;
using System.Windows.Forms;namespace _05_08
{
public class Form_05_08 : Form
{
public Form_05_08()
{
this.Click += new EventHandler(this.Form_Click);
} public void Form_Click(object sender, EventArgs e)
{
MessageBox.Show("您在窗体上单击了鼠标!");
}
} public class Class_05_08
{
public static void Main(String[] args)
{
Application.Run(new Form_05_08());
}
}
}