楼主用this.Hidde()方法来隐藏掉上一个页面:
FrmLogin
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (this.textBox1.Text == "AAA" && this.textBox2.Text == "123456")
{
Form2 f2 = new Form2();
f2.Show();
this.Hide();
}
}
}
From1
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form1 f1 = new Form1();
f1.Show();
this.Hide();
}
}
楼主可以试下
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.