ContextId: Variant;
The ContextId property returns identifier of the help section set for the component that was in focus when the event was generated.
Executing the example requires a form and any components on it. The unique values of the HelpContext property are set for all components. This procedure is set to handle the OnHelp event of the form. The folder must contain the Help.chm file.
Sub FormOnHelp(Sender: Object; Args: IHelpEventArgs);
Var
Help: IWinApplicationHelp;
Begin
Help := WinApplication.Help;
Help.Context(Args.ContextId, "Help.chm");
End Sub FormOnHelp;
The Help.chm help file opens when the component is selected and the F1 key is clicked. The appropriate help section is searched by the value of identifier of the help section set for the particular component.
See also: