RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Forms.TCloseQueryEvent Type

TCloseQueryEvent is used for event handlers that are called when a window is about to close.

Pascal
TCloseQueryEvent = procedure (Sender: TObject; var CanClose: Boolean) of object;
C++
(Sender: TObject; var CanClose: Boolean) ( TCloseQueryEvent)();

The TCloseQueryEvent type is the type for event handlers that allow an application to block the closing of a window (form or dialog).  

Sender is the object whose event handler is called. This is the form that is about to close or the dialog whose window is about to close.  

CanClose is set by the event handler to indicate whether the form or dialog can close (true) or whether the user should be blocked from closing it (false). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!