Skip to content

QueryUnloadConstants

Reason codes reported in the UnloadMode argument of a form's QueryUnload event, identifying what triggered the unload.

ConstantValueDescription
vbFormControlMenu0The user clicked the form's Close button (or selected Close from its system menu).
vbFormCode1The unload was initiated by code calling Unload.
vbAppWindows2Windows is shutting down.
vbAppTaskManager3The application is being closed by Task Manager.
vbFormMDIForm4The MDI parent form is being unloaded.
vbFormOwner5The owner form is being unloaded.

twinBASIC and LOGO copyright of "WaynePhillipsEA" author