private void button2_Click(object sender, EventArgs e) { if(MessageBox.Show("确认退出?","确认",MessageBoxButtons.OKCancel,MessageBoxIcon.Question) == DialogResult.OK) { //Application.Exit(); Close(); Dispose(); } }采纳哦