Help.ShowHelpIndex(Control, String) Method

Definition

Displays the index of the specified Help file.

public:
 static void ShowHelpIndex(System::Windows::Forms::Control ^ parent, System::String ^ url);
public static void ShowHelpIndex (System.Windows.Forms.Control parent, string url);
public static void ShowHelpIndex (System.Windows.Forms.Control? parent, string? url);
static member ShowHelpIndex : System.Windows.Forms.Control * string -> unit
Public Shared Sub ShowHelpIndex (parent As Control, url As String)

Parameters

parent
Control

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

url
String

The path and name of the Help file.

Examples

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 that is selected in the Help Navigator list. The Show Keyword button displays content in the Help file based on the keyword that is 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 ShowHelpIndex method. See the Help class overview for the complete code example.

private:
   void showIndex_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      
      // Display the index for the help file.
      Help::ShowHelpIndex( this, helpfile );
   }
private void showIndex_Click(object sender, System.EventArgs e)
{
    // Display the index for the help file.
    Help.ShowHelpIndex(this, helpfile);
}
Private Sub showIndex_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showIndex.Click
    ' Display the index for the Help file.
    Help.ShowHelpIndex(Me, helpfile)
End Sub

Remarks

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

Applies to

See also