UNLOADMODE parameter return value

xiaoxiao2021-03-06  51

Private Sub Form_Queryunload (Cancel As Integer, UnloadMode As Integer) if unloadMode = vbformControlMenu Then Cancel = TrueEnd Sub

UNLOADMODE parameter returns the following value:

Constant Value Description VBFormControlMenu 0 Users Select "Off" instructions from the Controls menu on the form. VBFormcode 1 unload statement is called by code. VBAppWindows 2 The current Microsoft Windows operating environment session ends. The VBAPPTASKManager 3 Microsoft Windows Task Manager is closing the application. The VBFormmdiForm 4 MDI subscription is being closed because the MDI form is close. VBFormowner 5 is closing because the owner of the form is closed, so the form is also closed.

转载请注明原文地址:https://www.9cbs.com/read-81910.html

New Post(0)