Sub OnCloseQuery(Sender: Object; Args: ICloseQueryEventArgs);
Begin
//set of operators;
End Sub OnCloseQuery;
The Sender parameter returns the component that has generated the event.
The Args parameter allows to determine event parameters.
The OnCloseQuery event occurs when the form receives a command for closing.
The reason of form closing can be determined using the CloseReason property of the event argument. Form closing can be allowed of prohibited using the Allowed property.
See also: