Using CHM files for Online Help Text

LANSA

Using CHM files for Online Help Text
Example 230 - Rating: advanced
The Things that Make Up this ExampleTo Execute this Example

CHM documents are widely used for the presentation of guides, manuals and help text in Windows environments. This example shows you how you might use a single CHM document to act as context sensitive online help text and as an overall product online guide/manual for your applications.

The example form S_230FA:




and the form S_230FB are used together in this example:



Execute form S_230FA. Form S_203FB should appear as well. Position the cursor in the Post / Zip Code field and click the Help button (or use Ctrl-H). Context sensitive help for the Post / Zip Code should appear like this:



If you then click or tab into the Employee Salary field then the context sensitive help should change to this:



Now click on the title bar of the main S_230FA form. The context sensitive help text should change to this:



This page then allows you to hyperlink off to other information in the CHM document. You can also cause the entire CHM document to display like this (use any of the Online Guide buttons available):



This is all done by making use of the reusable components S_203RH1 and S_203RH2. Collectively S_230RH1 and S_230RH2 form a general purpose CHM Help Manager.

The main features of this example are:

That the encapsulation of the help management facilities into reusable components S_230RH1/2 means that only a very small amount of code is required in S_230FA/B to enable the CHM help facilities.
  • The help text is context sensitive and can be associated with any visual component such as fields, buttons, etc.
  • The context sensitive help text will follow you around. If you leave the CHM help window open and move around in forms S_230FA or B then the contents of the help window will change with you.
  • The entire online guide can be presented at any time.
  • The sample forms S_230FA/B both have Help and/or Online Guide buttons ….. however neither have any code to handle the clicking of these buttons. The handling has been completely delegated to the S_230RH1/2 CHM help managers.
  • The automatic definition and handling of a Ctrl-H (show Help) and a Ctrl+G (show Online Guide) short cut key. These shortcut keys are enabled on forms S_230A and B ….. yet neither S_230FA or B have any code to define or handle them. Again the definition and handling has been delegated to the S_230RH1/2 CHM help managers.
Notes and Suggestions

The design and construction of CHM files is beyond the scope of the SET collection. There are many tools available to help you design and create CHM documents. For example, Microsoft supplies a free HTML Help Workshop product that will create CHM files. In this example the S_230HELP.CHM file used was constructed by using the HDK (Hypertext Development Kit) product. The source compiled by the HDK was the Microsoft word document S_230HELP.DOC.

This Example Also Demonstrates:
  • The use of Active-X Controls
  • How to display CHM documents from an application.
  • The definition and use of Short Cut Keys
  • Use of the Scope(*Shared) property
Keywords
Example 230CHM
HelpActive-X
Scope(*Shared)HTML Help Workshop
HDKOnline Help
Delegation Web Browser Control