[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TCloseEvent

Type used for an OnClose event handler in a form.

Declaration

Source position: forms.pp line 512

type TCloseEvent = procedure(

  Sender: TObject;

  var CloseAction: TCloseAction

) of object;

Arguments

Sender

  

The form that received an Close request.

CloseAction

  

Set this to caNone, to prevent the form from closing.

Description

Closing a form can have several meanings:

caNone
Do nothing (don't close).
caHide
Hide the form (default for modal forms).
caFree
Destroy the form.
caMinimize
Minimize the form (MDI child default).

The handler can set CloseAction to the desired value for the action.


Version 3.2 Generated 2024-02-25 Home