Show: Delphi C++
Display Preferences

Vcl.Forms.TApplication.Handle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Handle: HWnd read FHandle write SetHandle;

C++

__property HWND Handle = {read=FHandle, write=SetHandle, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TApplication

Description

Provides access to the window handle of the main form (window) of the application.

Use Handle when calling Windows API functions that require a parent window handle. For example, a DLL that displays its own top-level pop-up windows needs a parent window to display its windows in the application. Using the Handle property makes such windows part of the application, so that they are minimized, restored, enabled, and disabled with the application.

Note: When writing a DLL that uses VCL forms, assign the window handle of the host EXE's main window to the Handle property of the DLL's global Application variable. This makes the DLL's form part of the host application. Never assign to the Handle property in an EXE.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance