There is two Forms in my project : Form1 and Form2. There is a button in Form1, and what I want to do is closing Form1 and showing Form2 when that button clicked.
首先,我试过
Form2 frm = new Form2();
frm.Show();
this.Close();
but as Form1 was closed, Form2 also got closed. Next, I tried
Form2 frm = new Form2();
frm.Show();
this.Hide();
但有一个缺点,即表格2关闭时申请没有退出。所以,我不得不在表格2表格中填入更多表格来源_表格关闭部分。
我想知道这是否是正确的方法...