Icon OnCloseQuery Event

property OnCloseQuery: TCloseQueryEvent

This event is triggered when the dialog is closed by the user via the caption bar close button, or when the Close method is called.

Return True to allow the close to continue, or False to prevent the dialog from closing.
Image