Description
Provides access to a Microsoft Windows-based Help system or to compiled HTML Help files that you have created for your PowerBuilder application. When you call ShowHelp, PowerBuilder starts the Help executable and displays the Help file you specify.
Syntax
ShowHelp ( helpfile, helpcommand {, typeid } )
Argument |
Description |
---|---|
helpfile |
A string whose value is the name of the compiled HLP file or the CHM (HTML Help) file. |
helpcommand |
A value of the HelpCommand enumerated type. Values are:
|
typeid (optional) |
A number identifying the topic if helpcommand is Topic! or a string whose value is a keyword of a help topic if helpcommand is Keyword!. Do not specify typeid when helpcommand is Finder! or Index!. |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. ShowHelp returns -1 if you specify typeid when helpcommand is Finder! or Index!. If any argument's value is null, ShowHelp returns null.
Usage
To provide context-sensitive Help, use ShowHelp in appropriate scripts throughout your application with specific topic IDs or keywords.
If you specify Keyword! for helpcommand and the string in typeid is not unique, the Help Search window displays.
For information on how to create online Help files for your PowerBuilder application, see Providing Online Help for an Application in Application Techniques.
Examples
This statement displays the Help index in the INQ.HLP file:
ShowHelp("C:\PB\INQ.HLP", Index!)
This statement displays Help topic 143 in the file EMP.HLP file:
ShowHelp("EMP.HLP", Topic!, 143)
This statement displays the Help topic associated with the keyword Part# in the file EMP.HLP:
ShowHelp("EMP.HLP", Keyword!, "Part#")
This statement displays the Help search window. The word in the box above the keyword list is the first keyword that begins with M:
ShowHelp("EMP.HLP", Keyword!, "M")
See also