IWinApplicationHelp.Context

Fore Syntax

Context(TopicID: Integer; [HelpFile: String = ""]);

Fore.NET Syntax

Context(TopicID: Integer; HelpFile: String);

Parameters

TopicID - help page identifier. To use identifiers, an identifier map should be generated on the help design stage.

HelpFile - optional parameter determining name of the help file where page with the TopicID identifier is to be searched. If the parameter is not set, the search is executed in the file specified in the FileName property.

NOTE. If the path to help file is not specified, the file is searched in the folder, from which the current platform instance is started.

Description

The Context method searches for the page, with which the TopicID numeric identifier is associated in the help file. If the search is successful, it opens help file positioned on the page.

Comments

To ensure operation of this method, an identifier map must be generated for the help file at the design stage.

Detailed information on identifier map can be found in a specific software guide.

Fore Example

Executing the example requires a form, a button on it and the C:\Help\Project.chm help file. The example is a handler of the OnClick event for the Button1 component.

Add a link to the UI system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Help: IWinApplicationHelp;
Begin
    Help := WinApplication.Help;
    Help.Context(560148"C:\Help\Project.chm");
End Sub Button1OnClick;

On executing the example, after the button is clicked, the corresponding help system section by identifier value set for the specified component will be searched.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Ui;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    WinAppCls: WinApplicationClass = New WinApplicationClassClass();
    Help: IWinApplicationHelp;
Begin
    Help := WinAppCls.Help;
    Help.Context(560148"C:\Help\Project.chm");
End Sub;

See also:

IWinApplicationHelp