I have added HTML help to my APP and it works with no problems unless I try to open a 2nd CHM file without first closing the first CHM file. When opening the 2nd file the program gets to the line of code "HELP ID loWhichObject.helpcontextid". On the screen it starts to open the CHM file, gives it the correct name but leaves me with only a gray screen and no help. At this point I can not even click on the first open CHM file. When I go to Win 98 task manager (CTRL + ALT + DEL) it tells me the 2nd CHM file is "Not Responding".
When in the command window if I set help to first 1 CHM fle, issue the help command and then set help to a 2nd CHM file and issue the help command everything works fine and the 2 help files live in peace.
what have I done? (AAAAGGGGHHHHHH)
Thank You
Michael L Roof
********MY CODE
I have the following statement in the startup of my APP.
ON KEY LABEL F1 _SCREEN.ACTIVEFORM.HTMLelpCall(_SCREEN.ACTIVEFORM.activecontrol)
In my Base FORM class I have added the following method
*********Method HTMLHelpCall
Parameter loActiveObj
Local loWhichObject, lcObjectType, llIDFound, lcOldHelpFile
llIdFound = .F.
loWhichObject = loActiveObj
lcobjectType = TYPE('loWhichObject')
lcOldHelpFile = Set('help',1)
DO CASE
CASE EMPTY(Thisform.TAHelpFile)
wait window "There is no help available for this form." +CHR(13) +;
"A help file was not specified." nowait
CASE!FILE(gcProgPath + "Help\" + (Thisform.TAHelpFile))
wait window "There is no help available for this form." +CHR(13) +;
"An invalid help file was specified." nowait
OTHERWISE
* Set up the help file
Set Help to gcProgPath + "Help\" + (Thisform.TAHelpFile)
ENDCASE
DO WHILE lcobjectType # "U"
IF loWhichObject.helpcontextid # 0
llFound = .T.
HELP ID loWhichObject.helpcontextid
Exit
ENDIF
loWhichObject = loWhichObject.Parent
ENDDO
IF !llFound
IF (THISFORM.helpcontextid) = 0
HELP
ELSE
HELP ID (THISFORM.helpcontextid)
ENDIF
ENDIF
Set Help to (lcOldHelpFile)
RETURN
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only