Promotic
WikipediaLinkedInYoutubeTwitterFacebook

How to call user helps in application

The following text describes how to call helps in the runtime of the application that are written in the following formats:
- File with the extension HLP. It is an obsolete but used format in which the user documentation is structured. The file includes more text documents in itself that are identified by numbers. The HLP file can be created, for example, by means of the program Microsoft Help, etc.
- File with the extension CHM. It is a structured documentation. The file includes more HTML documents in itself that are identified by paths. The CMH file can be created, for example, by means of the program Microsoft HtmlHelp, etc. The whole documentation of the PROMOTIC system (file PromoticEn.chm) is written in this format.
- File with the extension HTM. It is an user HTML document on one page.
 
1) Global setting of the help file:

In the PmRoot object there is the Runtime helps path configurator. If you want to use only one CHM (HLP) file in the application, it is advisable to enter the path to it here. In case of the PROMOTIC electronic documentation, the path, for example, C:\Pm\PromoticEn.chm would be entered here.

 
2) Configuration of the help for the specific panel:

In the PmPanel object there is the configurator PmPanel > Panel > Panel help topic. You can enter the identifier of the internal document here that is displayed if you press the key F1 in this panel (when it is active). In case of the CHM file the path (in case of HLP, the number) to the internal document is entered here. For example, if you want to display the description of the PmData object in the PromoticEn.chm, it would be the path: /Objects/Promotic/PmData/Desc.htm. (To make it work, you must set the configurator from the step 1).

 
3) Calling the help by a script:

You can call the specific help by means of the Pm.ShowHelp method.

a) Case when the configurator from the step 1) needn't be set:

Pm.ShowHelp "\Pm\PromoticEn.chm", "/Objects/Promotic/PmData/Desc.htm"

b) Case when the configurator from the step 1) must be set:

Pm.ShowHelp "", "/Objects/Promotic/PmData/Desc.htm"
 
4) Calling the help by a script, another method:

The help can be also called by means of the Pm.ShellExecute method. For example:

Pm.ShellExecute "open", "PromoticEn.chm", "", "C:\Pm\", 3

It is possible to enter how the help has to appear (maximized, normal, etc.), but the internal document cannot be entered. It is rather suitable for viewing one HTM document.

© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice