This documentation is archived and is not being maintained.

Help.ShowHelp Method (Control, String, String)

Displays the contents of the Help file found at the specified URL for a specific keyword.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public static void ShowHelp (
	Control parent,
	string url,
	string keyword
)
public static void ShowHelp (
	Control parent, 
	String url, 
	String keyword
)
public static function ShowHelp (
	parent : Control, 
	url : String, 
	keyword : String
)
Not applicable.

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.

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.

The following code 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.

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 in the Parameter text box, and then click the Show Help button. To show the “To paint with a brush” Help topic by the keyword, type mspaint.chm::/paint_brush.htm in the Keyword text box, and then click the Show Keyword button.

This example shows only the call to the ShowHelp method. See the Help class overview for the complete code example.

private void showKeyword_Click(object sender, System.EventArgs e)
{
    // Display help using the provided keyword.
    Help.ShowHelp(this, helpfile, keyword.Text);
}

private void showKeyword_Click(Object sender, System.EventArgs e)
{
    // Display help using the provided keyword.
    Help.ShowHelp(this, helpfile, keyword.get_Text());
} //showKeyword_Click

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: