Overview:
The HelpViewerClient is used to make DotNet Help context-sensitive help (CSH) calls. HelpViewerClient only supports basic, non-embedded CSH calls. It also does not provide dynamic help functionality. HelpViewerClient will open the Help Viewer in a separate process from your application.
If you require embedded help, dynamic help, or opening the Help Viewer in the same process as your application, use the HelpViewerEmbeddedClient class.
To use the HelpViewerClient, you will first need to create an instance of the class using the constructor. You will then need to call Load() or TryLoad() to load the help system of your choice. You are then free to call Search() or ShowTopic(). The first time either of these two methods are called, a new Help Viewer window will be launched. Every call after that will open the desired topic or search results in the existing Help Viewer window.
Name | Description |
---|---|
public void HelpViewerClient() | Creates an instance of the HelpViewerClient. |
public void Load( string helpsystem ) | Loads the help system at the path specified in the helpsystem parameter. This method must be called once before calling Search() or ShowTopic(). If the help system does not exist, an ArgumentException is thrown. See also TryLoad(). |
public void Search( string searchString ) | Performs a search for the string specified in the searchString parameter. |
public void Search( string searchString, string cshid ) | Performs a search for the string specified in the searchString parameter. The cshid parameter is used to override the default starting topic of the help system. |
public void ShowTopic( string cshid ) | Opens the help system with the topic specified in cshid. |
public bool TryLoad( string helpsystem ) | See Load(). This method is equivalent to the Load() method, however, instead of throwing an exception, it returns true if the help system was loaded successfully and returns false otherwise. |
Refer to the sample application called HelpViewerClientTester for a fully functional application which uses the HelpViewerClient API.