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

# TCustomForm.WMCloseQuery

Handles the LM_CLOSEQUERY message used to close the window.

## Declaration

Source position: forms.pp line 608

`protected procedure TCustomForm.WMCloseQuery(`
`var message: TLMessage`
`); message;`

## Arguments

`message` |  | Control message examined in the method.

## Description

Calls the Close method to process and apply the ModalResult and CloseAction for the form. Sets the Result member in Message to 0 (zero) to indicate that WndProc should ignore the message; it has been handled in this method (and Close).