这个更适合在多窗口打开时用,之前的帖子C#中打开新窗体关闭旧窗体 用在登陆窗口比较好点
//Form2为要打开的新窗体名称
new System.Threading.Thread((System.Threading.ThreadStart)delegate { Application.Run(new Form2()); }).Start(); this.Close();
这个更适合在多窗口打开时用,之前的帖子C#中打开新窗体关闭旧窗体 用在登陆窗口比较好点
//Form2为要打开的新窗体名称
new System.Threading.Thread((System.Threading.ThreadStart)delegate { Application.Run(new Form2()); }).Start(); this.Close();