Program Help for Visual Basic applications

This information is for developers connecting context-sensitive Help topics to Visual Basic applica­tions.

1)Open the project in Visual Basic.

2)If the map files were created in RoboHelp, ask the Help system author to export the map files from RoboHelp to Visual Basic.

3)Include RoboHelp_CSH.vb with your project. The function RH_ShowHelp is defined in RoboHelp_CSH.vb.

4)Add a reference to the Microsoft Internet Controls.

5)To launch the Help system, call RH_ShowHelp with uCommand set to HH_DISPLAY_INDEX, HH_DISPLAY_SEARCH, or HH_DISPLAY_TOC and dwData set to "0".

6)Set the value of the Help source parameter (according to the Output type) in a string variable called StrPathAndWindow as follows:

note:    In the following examples, the API shares the same parameters regardless of output type. The only change made is the location of the Help file.

WebHelp/FlashHelp

Stores the full path to the start page and a dialog name in a string variable called StrPathAnd­Window. An example of this string is "C:\Program Files\MyApplication\WebHelp\MyStart­Page.htm>MyWindow.”

WebHelp Pro

Stores the full path to the server and a window name in a string variable called StrPathAnd­Window. Check with the web administrator to determine whether the project name is required. (The project name is required if the Auto-Merge option in the RoboHelp Server Configuration Manager is set to Off.)

An example of this string is http://<servername>/robohelp/rest/search?project=<project-name>&quesn=<search-query>

HTML Help

Stores the full path to the CHM file and a dialog name in a string variable called StrPathAnd­Window. An example of this string is “C:\Program Files\MyApplica­tion\MyHelp.chm>MyWindow.”

tip:   Do not hard-code the string variable StrPathAndWindow.

7)To call a Help topic, call the function RH_ShowHelp with a_pszHelpFile set to StrPathAndWindow, uCommand set to HH_HELP_CONTEXT, and dwData set to the map ID of the topic.

RH_ShowHelp syntax

RH_ShowHelp syntax

 RH_ShowHelp(hParent As Long, a_pszHelpFile As String, uCommand As Long, dwData as Long) As Boolean

Example:

 To open the topic mapped to number 1:  
 Public cshObject as new RoboHelp_CSH .RH_ShowHelp Me.HWND, StrPathAndWindow, cshObject.HH_HELP_CONTEXT, 1;

Notes:

In WebHelp Pro projects, the new context-sensitive Help API is supported only with Robo­Help Server.

Create one global RoboHelp_CSH object to use for all context-sensitive Help calls.

Airplane Help for Visual Basic applications

If using Airplane Help, associate offline Help before making function calls.

Syntax

Public Function RH_AssociateOfflineHelp(pszPrimaryHelpSource As String, pszBackupHelpSource As String) As Boolean

Example

  strOnline = "http:// www.mycompany.com/roboapi.asp?project=myproject"
 strOffline = "C:\Program Files\My App\WebHelp\StartPage.htm"
 Public cshObject as new RoboHelp_CSH  ' Should be global object
 cshObject. RH_AssociateOfflineHelp strOnline, strOffline


September 30, 2016

Legal Notices | Online Privacy Policy