Vcl.AppEvnts.TCustomApplicationEvents.OnHelp

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnHelp: THelpEvent read FOnHelp write FOnHelp;

C++

__property Vcl::Forms::THelpEvent OnHelp = {read=FOnHelp, write=FOnHelp};

Properties

Type Visibility Source Unit Parent
event protected
Vcl.AppEvnts.pas
Vcl.AppEvnts.hpp
Vcl.AppEvnts TCustomApplicationEvents

Description

Occurs when the application receives a request for Help.

Write an OnHelp event handler to perform special processing when the user requests Help. The HelpContext and HelpJump methods automatically trigger the OnHelp event.

The THelpEvent type has the following parameters: CallHelp, Command, and Data.

Set CallHelp to true if the application should still invoke the Help system after the event. Set CallHelp to false to prevent the default response given by the help system. All application Help methods go through OnHelp. The application calls the Help system only if OnHelp's CallHelp parameter is true or if no OnHelp event handler is assigned.

The event handler returns True if it succeeds, False if it fails.

The possible values for the Data parameter depend upon the value of the Command parameter. To find the possible values of the Command and Data parameters, see the appropriate HTMLHelp topics in the MSDN Library.

In order for the OnHelp event handler to work properly, insert in the uses clause of your application the Vcl.HtmlHelpViewer or another unit that provides an interface to the external Help viewer to use. The Vcl.HtmlHelpViewer unit provides a Delphi interface to the HTMLHelp Windows native Help handling function. For C++, you need to include the HTMLHelpViewer.hpp header file.

Note: Call the CancelDispatch method from an OnHelp event handler to prevent the application from forwarding the event to any other application events objects.

See Also

Code Examples