叫你看帮助文档你有看过么?
If MessageBox.Show("你是否退出管理系统?","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then BaseMainForm.Visible = True BaseMainForm.CloseEnd If