private void button1_Click(object sender, EventArgs e)
{
if (MessageBox.Show(textBox1.Text, "你的名字", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.Cancel)
{
label1.Text = "你是大";
}
}
private void button2_Click(object sender, EventArgs e)
{
var frm = new Form2();
frm.ShowDialog();
}
窗体加载初始化操作