Sign in Join
FPDoc Onlineexperiment

TApplication.MainFormHandle property

Member of TApplicationpublicIn unit Forms

Window handle for the MainForm in the application.

Declaration

pascal
property MainFormHandle: HWND read GetMainFormHandle;

Description

MainFormHandle is a read-only HWND property which contains the handle for the form instance used as the main form in the application.

The value for the property is derived using the OnGetMainFormHandle event handler (when assigned) or a TGetHandleEvent handler assigned in the application. When neither of these mechanisms provides a value other than zero (0), the window handle assigned in the MainForm property is used.

MainFormHandle is used in the implementation of methods in WidgetSet classes, primarily for the Windows platform, and in custom-drawn controls.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.