AfterOpenProject
Forms("窗口1").open
BeforeCloseProject
static n As Integer
msgbox(n)
n=n+1
窗口1_BeforeClose
Syscmd.Project.Exit()