FormClosing事件
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(Form1_FormClosing);
void Form1_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
{
//关闭你要关闭的东西吧
throw new System.NotImplementedException();
}
Application.Exit:通知winform消息循环退出。
Environment.Exit:终止当前进程,返回exitcode给操作系统
在FormClosed事件下写Application.Exit();
Application.Exit();
还有其他方法