在queryUnload事件中,根据UnloadMode判断
vbFormControlMenu
0
The user chose the Close command from the Control menu on the form. vbFormCode
1
The Unload statement is invoked from code. vbAppWindows
2
The current Microsoft Windows operating environment session is ending. vbAppTaskManager
3
The Microsoft Windows Task Manager is closing the application. vbFormMDIForm
4
An MDI child form is closing because the MDI form is closing. vbFormOwner
5
A form is closing because its owner is closing.
vbFormControlMenu
0
The user chose the Close command from the Control menu on the form. vbFormCode
1
The Unload statement is invoked from code. vbAppWindows
2
The current Microsoft Windows operating environment session is ending. vbAppTaskManager
3
The Microsoft Windows Task Manager is closing the application. vbFormMDIForm
4
An MDI child form is closing because the MDI form is closing. vbFormOwner
5
A form is closing because its owner is closing.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货