Jerry,
I have the exact same problem and have resorted to useing the shellapi to view the CHM file. Not at all what I want to do -- hopefully someone will come up with a reason for this and a solution.
Kevin
******
Eample
Do ShellAPIViewing with "MyHelpFile.chm"
**Shell API for Viewing
**ShellAPIViewing.prg
** The only problem is that when a file is not ASSOCIATED there is no warning or message available
** Shellexecute returns integers which I don't know what the values represent.
LPARAMETERS lcLink, lcAction, lcParms
lcAction=IIF(empty(lcAction),"Open", lcAction)
lcParms=IIF(empty(lcParms),"",lcParms)
DECLARE integer ShellExecute ;
in shell32.dll ;
integer nWinHandle , ;
string cOperation, ;
string cFileName, ;
string cParameters, ;
string cDirectory, ;
integer nShowWindow
DECLARE Integer FindWindow ;
in win32api ;
string cNull , ;
string cWinName
IF empty(lcLink)
lcLink=getfile()
ENDIF
*!* llWindow=FindWindow(0,_screen.caption)
IF not empty(lcLink)
lcResult= ShellExecute(FindWindow(0,_screen.caption), ;
lcAction, lcLink, lcParms, sys(2023), 1)
wait window timeout 2 "Opening File "+alltrim(lcLink)+". The file will display if it associated with an application."
ENDIF