Closing Event
Applies To
Form
Description
This is an event that is run before the form is closed.
Usage
Form_Closing(Sender$ As String, ByRef Cancel As Boolean)
Sender$
Sets the name of the form that sent the event.
Cancel
Sets whether to cancel closing the form.
- Sender$
- Sets the name of the form that sent the event.
Remarks
You can use this event to perform tasks before a form has been closed.
You can also cancel closing the form by setting Cancel as True.
See Also
Form
Example
Global Boolean g_CanClose
Function Form_Closing(Sender$ As String, ByRef Cancel As Boolean)
If g_CanClose = False Then
'Cancel closing the form
Cancel = True
EndIf
Fend