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

# TApplication.OnGetMainFormHandle

Event handler used to provide a value for the MainFormHandle property.

## Declaration

Source position: forms.pp line 1752

`public property TApplication.OnGetMainFormHandle : TGetHandleEvent read FOnGetMainFormHandle write FOnGetMainFormHandle;`

## Description

Used in the implementation of the GetMainFormHandle method. Provides the first opportunity to set the value for MainFormHandle before calling the other handlers added to the application.

## See also

TApplication.MainFormHandle |  | Window handle for the MainForm in the application.
TApplication.MainForm |  | Contains the main form for the application.
TApplicationHandlerType |  | Types of Application notification handlers.