From窗体的关闭事件,避免和FormClosed混淆。1privatevoidForm1_FormClosing(objectsender,FormClosingEventArgse)2{3DialogResultdr=MessageBox.Show("系统提示","是否退出?",MessageBoxButtons.YesNo,MessageBoxIcon.Information);4if(dr==DialogResult.Yes)5{6System.Environment.Exit(0)...
查看全文