参见如下:
this.button3.Location = new System.Drawing.Point(224, 104);
this.button3.Name = "button3";
this.button3.TabIndex = 7;
this.button3.Text = "button3";
this.button3.Click += new System.EventHandler(MYClick);你可以定义自己的事件:
private void MYClick(object sender, System.EventArgs e)
{
MessageBox.Show("you button the button3");
}
this.button3.Location = new System.Drawing.Point(224, 104);
this.button3.Name = "button3";
this.button3.TabIndex = 7;
this.button3.Text = "button3";
this.button3.Click += new System.EventHandler(MYClick);你可以定义自己的事件:
private void MYClick(object sender, System.EventArgs e)
{
MessageBox.Show("you button the button3");
}
private void click(object sender,System.EventArgs e)
{
}
然后以 “任何名字” 为名程写这个事件