创建界面
编写代码
1.按钮1
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "Hello World" ;//在文本框中显示“Hello World”
}
1.按钮2
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "" ;//将文本框显示的内容清空
}
1.按钮3
private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello World") ;//弹出一个对话框,显示“Hello world"
}