定义一个全局变量:
public _Close as boolean
做一个关闭按钮:
_Close = True
Syscmd.Project.Exit
在BeforeCloseProject事件加入代码:
If _Close = False Then
e.Cancel = True
End If