Document-Based Applications


Online Help



Online help is the system of providing help files with an application. Online help is usually available from the main menu through a menu group created under a Help category.

Status Bar Messages

There are various small but effective techniques you can use to provide help in your Topic Applied: never neglect help.

One way you can provide simple help consists of displaying short indicative messages on a status bar. To do this, you can first create sections, called panels, on a status bar and then display the necessary messages in the section of your choice. The message can be anything but it should consist of just a few words to fit in its section without going over board.

Tool Tips

A tool tip is a small yellow box that displays a word or a group of words when the user positions the mouse on top of a control:

tool tip example

The Help Provider

Context-sensitive help allows the user to get local help on a particular control. This works by the user who can first click a control and then press Shift+F1. This displays a yellow box with a word or a group of words:

Microsoft Access - Context-Sensitive Help

This help is easier to provide in a dialog box because a dialog has a feature not available on a form. It consists of adding a button with a question mark and then creating the words that would display eventually. When you create this type of dialog box, the user can click the question marked button and click a control. The user can also press Shift+F1. This causes the mouse pointer to be equipped with a question mark. The user can then click a control and a yellow box would appear for that control, providing help.


To make it easy to provide online help in an application, the .NET Framework provides the HelpProvider class. To let you specify the tool tip of a control, the HelpProvider class is equipped with a method named SetHelpString. Its signature is:

abstract SetHelpString : 
        ctl:Control * 
        helpString:string -> unit  
override SetHelpString : 
        ctl:Control * 
        helpString:string -> unit

To specify the tool tip of a control, pass a reference of the control as the first argument and pass the desired string as the second argument.


Introduction to HTML Help

The online help we described above provides only small yellow boxes. It is called context-sensitive because it provides its assistance on only a control of the form. Another technique, in fact highly supported with any commercial program, consists of providing an external application that resembles a book. This allows the user to get more detailed information about almost any aspect of the application.

To provide online help in your application, you can use an external system. This consists of creating a complete application whose only purpose is to describe another application. This means that, in the beginning, both applications are not related in any way. With HTML Help, you must first create HTML files. You create these files anyway you like but, in this case, they are meant to provide support for a specific application. Therefore, when creating the files, try to divide them by issues. For example, you can create a file for each form of your application and use that file to describe what the form or dialog box is used for. You still can use any approach to create the files you would need. Experience will guide you eventually into knowing what to put in those files.

After creating the HTML files, you can open HTML Help Workshop which is a complete but separate application. This application is freely available from Microsoft and you can download it from the MSDN web site.

HTML Help and Windows Applications

After creating the HTML Help application, you can use a HelpProvider control to connect it to your application. The HelpProvider control is equipped with the HelpNamespace property:

abstract HelpNamespace : string with get, set 
override HelpNamespace : string with get, set

This property allows you to specify the application that contains the help application. Besides the HelpNamespace property, the HelpProvider control provides various methods to manage help.

HTML Help can be provided to an application through the Help class. The overloaded ShowHelp() method is used to specify the help file to display and possibly additional information. Notice that all versions take a first argument as a Control type. This is the parent control from where the online help will be provided.

The first version allows you specify the help file. It can be the help file specified in the HelpProvider.HelpNamespace property mentioned above.

The second and the fourth versions allow you to specify the tab of the HTML Help window to display when the method is called. This is done through the HelpNavigator enumerator that has a value for each tab of the HTML Help window. the fourth version can be used to open the HTML Help window from its Find tab and specify a keyword to search for.

The third version can be used to open a help file based on a keyword.

The ShowHelpIndex() method can be used to open the Index tab of the HTML Help window.



Home Copyright © 2014-2015, FunctionX, Inc. Home