只需要在点击跳转的按钮上加上Application.ExitThread();
private void button2_Click(object sender, EventArgs e)
{
Form2 fm2 = new Form2();
this.Hide();
fm2.ShowDialog();
Application.ExitThread();
}