BeforeCloseProject
if 全局变量=True then
Dim Result As DialogResult
Result = Messagebox.Show("请问是否确定要退出琅日信息系统?","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.No Then '如果用户选择否
e.Cancel = True '取消关闭项目
Else
e.skipsave =True
End If
end if