Forms.TCustomForm.CloseQuery
From RAD Studio VCL Reference
Contents |
Delphi Information
From Forms.pas
function CloseQuery(): Boolean; virtual;
Unit: Forms
Type: method
Visibility: public
Member Of: TCustomForm
C++ Information
From Forms.hpp
virtual bool __fastcall CloseQuery(void);
Unit: Forms
Type: method
Visibility: public
Member Of: TCustomForm
Description
Close attempt event dispatcher.
CloseQuery is called automatically when an attempt is made to close the form. CloseQuery can allow the form to close by returning true, or prevent the form from closing by returning false.
As implemented in TCustomForm, CloseQuery polls any MDI children by calling their CloseQuery methods. If no child form aborts the close, CloseQuery then calls the OnCloseQuery event handler, if it exists, to determine if the close should be allowed. If no such event handler exists, CloseQuery returns true.