Displays the contents of the Help file found at the specified URL for a specific keyword.
[Visual Basic]
Overloads Public Shared Sub ShowHelp( _
ByVal parent As Control, _
ByVal url As String, _
ByVal keyword As String _
)
[C#]
public static void ShowHelp(
Control parent,
string url,
string keyword
);
[C++]
public: static void ShowHelp(
Control* parent,
String* url,
String* keyword
);
[JScript]
public static function ShowHelp(
parent : Control,
url : String,
keyword : String
);
Parameters
parent
A Control that identifies the parent of the Help dialog box.
url
The path and name of the Help file.
keyword
The keyword to display Help for.
Remarks
The url parameter can be of the form C:\path\sample.chm or/folder/file.htm.
If you provide the keyword a null reference (Nothing in Visual Basic), the table of contents for the Help file will be displayed.
Example
[Visual Basic, C#, C++] The following example displays a form with three buttons that can be used to interact with the mspaint.chm Help file. The Show Help Index button displays the Index tab for the Help file. The Show Help button displays content in the Help file based on the value selected in the Help Navigator list. The Show Keyword button displays content in the Help file based on the keyword specified in the Keyword text box.
[Visual Basic, C#, C++] For example, to show the Ovals Help page by the index value, select the HelpNavigator.KeywordIndex value in the Help Navigator drop-down list, type "ovals" (without the quotation marks) in the Parameter text box, and click the Show Help button. To show the "To paint with a brush" Help topic by the keyword, type "mspaint.chm::/paint_brush.htm" (without the quotation marks) in the Keyword text box and click the Show Keyword button.
[Visual Basic, C#, C++] This example only shows the call to ShowHelp. See the Help class overview for the complete code example.
[Visual Basic]
Private Sub showKeyword_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showKeyword.Click
' Display Help using the provided keyword.
Help.ShowHelp(Me, helpfile, keyword.Text)
End Sub 'showKeyword_Click