111,126
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.Button button2;
this.button1 = new System.Windows.Forms.Button();
button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button2
//
button2.Location = new System.Drawing.Point(187, 107);
button2.Name = "button2";
button2.Size = new System.Drawing.Size(75, 23);
button2.TabIndex = 1;
button2.Text = "say hi";
button2.UseVisualStyleBackColor = true;
button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(187, 47);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "say hello";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(button2);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "BaseForm";
this.ResumeLayout(false);
}
#endregion
protected System.Windows.Forms.Button button1;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("hello !");
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Hi");
}