Vcl.Forms.TCustomForm.CloseQuery

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CloseQuery: Boolean; virtual;

C++

virtual bool __fastcall CloseQuery();

Properties

Type Visibility Source Unit Parent
function public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms 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.

See Also