By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,964 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,964 IT Pros & Developers. It's quick & easy.

HtmlHelp causes error on application close

P: n/a
Hello

I have written some help files using Html Help Workshop version 4.74.8702

I use the following code to launch the chm file

Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller as long, ByVal pszFile as String, ByVal uCommand as long,
dwData as Any) as Long
Const HH_DISPLAY_TOPIC = $H0
Const HH_HELP_CONTEXT = &HF
Public Sub LaunchHelp ()

Dim hwndHelp as Long
hwndHelp = HtmlHelp(Application.hWndAccessApp, "C:\MyHelp.chm",
HH_HELP_CONTEXT, _
ByVal 1002)

End Sub
When I launch MyHelp.chm from a MSACCESS 2000 application using the code
above the help window
opens displaying the correct help topic but if I close the application with
the help window
still opened I get the following error:

(This program has performed an illegal operation and will be shut down.)
Is there something wrong with the code I am using to launch the chm?

If I open the Microsoft Access Help from the same application
and then close the application while the help window is still opened there
is no error.

Thanks
G Gerard

May 5 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I found the same problem just yesterday. The article at the following
url contains the QuitHelp subroutine which when in the unload event
procedure of my menu form fixed it:

<http://groups.google.com/group/micro...al.discussion/
browse_thread/thread/f4ed440fd9868c98/ae1126acdda7b255?
lnk=st&q=conEmpStr++HH_CLOSE_ALL&rnum=1#ae1126acdd a7b255>

Public Sub QuitHelp()
' Close all Help files - No fix known - MS bug # 11005
hwndHelp = HtmlHelp(0&, HelpFileName, HH_CLOSE_ALL, ByVal 0&)
End Sub

Regards
Mark

G Gerard wrote:
Hello

I have written some help files using Html Help Workshop version 4.74.8702

I use the following code to launch the chm file

Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller as long, ByVal pszFile as String, ByVal uCommand as long,
dwData as Any) as Long
Const HH_DISPLAY_TOPIC = $H0
Const HH_HELP_CONTEXT = &HF
Public Sub LaunchHelp ()

Dim hwndHelp as Long
hwndHelp = HtmlHelp(Application.hWndAccessApp, "C:\MyHelp.chm",
HH_HELP_CONTEXT, _
ByVal 1002)

End Sub
When I launch MyHelp.chm from a MSACCESS 2000 application using the code
above the help window
opens displaying the correct help topic but if I close the application with
the help window
still opened I get the following error:

(This program has performed an illegal operation and will be shut down.)
Is there something wrong with the code I am using to launch the chm?

If I open the Microsoft Access Help from the same application
and then close the application while the help window is still opened there
is no error.

Thanks
G Gerard
May 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.