Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with application's help

Status
Not open for further replies.

Crazyf

Programmer
Jun 15, 2007
29
0
0
GR
Hello everyone,
I have created a small application in vb6 includes a chm html help file. My application has one mdiform and the other forms are mdi childs. It works fine but there is a problem. When i run the program the form i see is the mdiform it is the main form for my program if open from menu the help file and if i close the application from X button the vb6 closes unormally. I don't know why does this happen. I am thinging the maybe i have to subclass the chm file to be mdichild but i don't know how to do because i am new in vb6 to do this and i don't know too, if it's really feasible. Also I am wantering that maybe happens something else and the vb6 close unormally. I don't know what to suppose.
Any help will be much appreciated.

Thank you
in advanced
 
Thank you much Bob, that doesnot solve my problem. I tried in the query unload event mdimainform.UnloadAllForms the advantage of this statement is that the vb6 doesn't ends unormally but when the application has been closed by the user the chm html help file is still opened. Is there a way to unload the .chm (html help file) with code through vb6 and how?
 
Oh, I see what you're asking. It's because the help file opens in a different process.

Check OpenProcess and CloseHandle in the Windows API. You can do a search on this site for code samples.

Bob
 
Thank both of you.
Bob I am not familiar with subclasses in windows api.
Zemp this doesnot solve my problem.
I declared these in my module .bas and i called the quithelp in the mdiform query unload and now it works fine.

Const HH_CLOSE_ALL = &H12
Public Sub QuitHelp()
hwndHelp = HTMLHelp(0&, "", HH_CLOSE_ALL, ByVal 0&)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top