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

# TQueryEndSessionEvent

Specifies an event type used to handle a WM_QUERYENDSESSION window message in an application.

## Declaration

Source position: forms.pp line 1321

`type TQueryEndSessionEvent = procedure(`
`var Cancel: Boolean`
`) of object;`

## Arguments

`Cancel` |  | Set Cancel to True to prevent the session from ending.

## See also

TApplication.OnQueryEndSession |  | Event handler signalled to determine if the current session be be ended, and the application can be closed.