In Delphi, calling a CHM file can be implemented by reference to a function htmlhelpa file for hhctrl.ocx files.
However, here, we can also use the API function shellexecute to open the CHM help file.
Information found online, usually
Shellexecute (self.handle, 'open', 'help.chm', '', ', sw_show);?
The way is achieved.
But there is a deficiencies that cannot open the specified help page, which is displayed is the start page for helping the document.
Thinking that the CHM file is associated with the HH.exe program, then the HH.exe program is executed, and the address of the specified page should be opened, you should open the specified help page.
Methods as below:
Shellexecute (self.handle, 'open', 'hh.exe', 'mk: @msitte:' extractfilepath (application.exename) 'WordImgGener.chm :: / html / welcome.htm', '', sw_show) ;?
As long as in the onhelp event in Form, the corresponding address can be displayed in response to the current ActiveControl. You can also add an actionList in the Form to add actions, set the shortcut to F1, call the above function in the Execute event to open the CHM help document, when it is a simple method.