【发布时间】:2014-09-06 17:27:59
【问题描述】:
好的,所以我有 2 个表格 Form1 和 Form2。 问题:所以我想在单击 Form1 中的按钮并隐藏 Form1 时打开 Form2,然后我想在关闭 Form 2 时关闭 Form1。
private void button1_Click(object sender, EventArgs e)
{
Form1 f1 = new Form1();
Form2 f2 = new Form2(textBox1.Text);
f2.Show();
this.Hide();
}
}
public Form2(string s)
{
InitializeComponent();
label1.Text = s;
}
【问题讨论】: