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

# TCustomForm.OnHelp

Handler called when Help is requested.

## Declaration

Source position: forms.pp line 807

`public property TCustomForm.OnHelp : THelpEvent read FOnHelp write FOnHelp;`

## Description

OnHelp is a THelpEvent property which contains the event handler signalled when a Help command is executed for the form instance. Arguments to the event handler identify the command and the context used in the help request.

Command contains the help request type, and corresponds to the values used in the Windows WinHelp API.

Data is a PtrInt type which points the context information for the help request.

The CallHelp argument indicates if handler(s) in the Application instance should be called when the event handler in the form is completed. Set CallHelp to False when the help request has been satisfied in the event handler.

An application must implement and assign an object function using the signature for the handler to respond to the event notification.

Set the return value to True if the Help request was successfully executed.

The OnHelp event handler for the active form is signalled when the TApplication instance executes its DoOnHelp method. The arguments to the event handler contain the values intercepted in the WMHelp message processing for the application. If the OnHelp event handler has not been assigned for the active form, the OnHelp event handler in the Application singleton is signalled (when assigned).

## See also

THelpEvent |  | Type used for an OnHelp event handler.
Application |  | The TApplication singleton.
TApplication.OnHelp |  | Event handler signalled when help is requested in the application.
TApplication.DoOnHelp |  | Signals an OnHelp event handler.