Help.ShowHelp Method (Control, String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Displays the contents of the Help file at the specified URL.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static void ShowHelp(
	Control parent,
	string url
)

Parameters

parent
Type: System.Windows.Forms.Control

A Control that identifies the parent of the Help dialog box.

url
Type: System.String

The path and name of the Help file.

The url parameter can be of the form C:\path\sample.chm or /folder/file.htm.

The following code example demonstrates the ShowHelp method. To run this example, paste the following code into a form that contains a button named Button1.

// Open the Help file for the Character Map topic.  
private void Button1_Click(System.Object sender, System.EventArgs e)
{

	Help.ShowHelp(TextBox1, "file://c:\\charmap.chm");
}

WebPermission

for accessing an HTML Help file through an HTTP request. Associated enumeration: NetworkAccess.Connect

SecurityPermission

for accessing an HTML Help file not served from an HTTP server. Associated enumeration: UnmanagedCode

.NET Framework
Available since 1.1
Return to top
Show: