方法:
private void Button_Click(object sender,EventArgs e)
{
if (((Button)sender).Name=="button1")
{
label1.Text = "第一号按钮:";
}
else
{
label1.Text = "第二号按钮";
}
}
在Designer中注册:
button1.Click += new EventHandler(this.Button_Click);
button2.Click += new EventHandler(this.Button_Click);