DotNET Integration
Previous Topic  Next Topic 

The Microsoft.NET (dot net) framework uses HTML Help files (chm files) for context-sensitive help. You can easily integrate your .CHM files created with Fast-Help into your .NET application, whether it is written in Visual Basic, C# (C sharp), Delphi .NET or any other .NET language.

Firstly, drop a HelpProvider component on your form and set its HelpNamespace property to the full path to your .chm file or just the chm file name if it is in the same folder as your .exe.

Adding the HelpProvider component to the form will make new properties available for each control on the form. Associate help topics with the controls as follows:

  1. Set the ShowHelp property of the control to True
  2. Set the HelpNavigator property to "Topic"
  3. Set the HelpKeyword property to "TestPage.html" where TestPage is the Context String of the topic in Fast-Help followed by ".html". You can see what your Context String is by clicking on the Properties tab, below the editor in Fast-Help.
  4. Make sure the HelpString property is blank.

When the user presses F1, your application will show the help topic associated with the control that has keyboard focus. When the user clicks on the question mark button on the caption bar of the window, and then on a control, help for that control is displayed. If a control does not have ShowHelp set to True, the help topic associated with the control's parent control is used instead. If none of the parent controls have a help topic specified, the help topic associated with the form itself is displayed. If the form does not have help either, nothing will happen. No error message will be displayed.

To make the question mark button appear on the caption bar of your form, set the form's HelpButton property to True, and set both MaximizeBox and MinimizeBox to False.

To programmatically display help, you can use the static method ShowHelp() of the Help class.

To show the table of contents, call: Help.ShowHelp(this, "helpfile.chm");

To show the topic with Context String "TestPage", call: Help.ShowHelp(this, "helpfile.chm", HelpNavigator.Topic, "TestPage.html");