To link a project developed using Innovasys Document! X or HelpStudio, follow the steps below.
Setting up the project
- The first step is to add a HelpProvider control to your form for design time support.
- The HelpNamespace property can be set at either design time or runtime, but must be set with the name of the CHM file generated by HelpStudio.
- If you wish to support "what's this" help, set the HelpButton property of the parent form to True.
Setting What's This Help for controls
- Select the control you wish to have help available for. Scroll down the list of properties until you reach the Misc section. Here you will find a number of new properties added by the HelpProvider control. They will have the suffix "on <name>", where <name> is the name of your HelpProvider control.
- Set the HelpKeyword property to the name of your HelpStudio topic, with a .html suffix. For example, if you had a topic named default, you would enter default.html as the property value.
- The HelpNavigator property defines the view displayed. By default this is AssociateIndex, you must change it to use Topic instead.
- Repeat for any other controls you wish to display what's this help for.
- At runtime, help can be invoked by either selecting the control and pressing F1, or by click the help button on the window titlebar and then clicking a control which has help assigned to it.
Displaying a help topic manually
The shared Help class offered by the System.Windows.Forms name space allows you to display your help topics. You can use the ShowHelp method to display a topic. The URL parameter of this method should be filled with your CHM filename, and the param parameter with the name of your topic and the .html suffix.
For example, assuming you had a HelpProvider control already initialized named ContextHelp, and you wished to display a topic named default, you could call the following code:
'display the how to topic Help.ShowHelp(Me, ContextHelp.HelpNamespace, HelpNavigator.Topic, "default.html")
//display the how to topic Help.ShowHelp(this, ContextHelp.HelpNamespace, HelpNavigator.Topic, "default.html");