Please have a look at ShowHelp function fail notification and search for HH API testing by FAR HTML as a help authoring tool. Check if you have connected in a proper way:
You can use the ShowHelp method provided by the Help class from the code of your application. Displaying a help topic by its Context Id you'll need:
Help.ShowHelp(this, "C:\foobar.chm", HelpNavigator.TopicId, "10001");
"C:\foobar.chm" is the full path to your CHM file and "10001" is the Context Id of the topic to display, as specified in your help project.
Please note you can use a #include
statement too. Open your .hhp file in a text editor and add the sections ALIAS and MAP to the HTMLHelp project file and add the files to your help project:
[ALIAS]
#include alias.h
[MAP]
#include map.h
The purpose of the two files is to ease the coordination between developer and help author. The mapping file links an ID to the map number - typically this can be easily created by the developer and passed to the help author. Then the help author creates an alias file linking the IDs to the topic names.
ALIAS file
In a text editor enter the ALIAS details like IDH_90000=index.htm. Save the file as 'alias.h' in same folder as your help project file.
;----------------------------------------
; alias.h file example for HTMLHelp (CHM)
; www.help-info.de
;
; All IDH's > 10000 for better format
; last edited: 2006-07-09
;----------------------------------------
IDH_90000=index.htm
IDH_10000=Context-sensitive_example\contextID-10000.htm
IDH_10010=Context-sensitive_example\contextID-10010.htm
IDH_20000=Context-sensitive_example\contextID-20000.htm
IDH_20010=Context-sensitive_example\contextID-20010.htm
MAP file
In a text editor enter the MAP details like #define IDH_90000 90000;frmMain. Save the file as 'map.h' in same folder as your help project file.
;--------------------------------------
; map.h file example for HTMLHelp (CHM)
; www.help-info.de
;
; All IDH's > 10000 for better format
; ;comment at end of line
;--------------------------------------
#define IDH_90000 90000;frmMain
#define IDH_10000 10000;frmAddressDataContextID-1
#define IDH_10010 10010;frmAddressDataContextID-2
#define IDH_20000 20000;frmAddressDataContextID-3
#define IDH_20010 20010;frmAddressDataContextID-4
For further information see Creating Context-Sensitive Help for Applications