|
-
Jun 28th, 2000, 02:17 PM
#1
Thread Starter
Lively Member
I'm sorry, I'm sure this is an easy thing to do, but I've never made a help file before. I've figured out how to make it, I've written it, I've made my App open it when you press F1, but how do I invoke it through code? I thought it would be a simple command like App.Helpfile.show or something. I can't seem to shell the file because it says it's not found. Is there a simple method?
Any help on this would be much appreciated.
Andrew Empson
vb6(ent) SP4
-
Jun 28th, 2000, 02:57 PM
#2
Frenzied Member
using a Common Dialog Box:
Code:
Private Sub mnuHelp_Click()
With CommonDialog1
.HelpFile = App.HelpFile
.HelpCommand = &HB
.ShowHelp
End With
End Sub
-
Jun 28th, 2000, 03:02 PM
#3
Lively Member
That's more simpler.
You must say where your helpfile is by this instruction
Code:
App.HelpFile=App.path & "\HelpFile.hlp"
Next in the form properties, you have the HelpContextID. In this property, you must give the ID of the page of the help file you want to show. This ID is set when you make your help file.
After this, when you hit the F1 key on the form, the help file is load automaticaly and the right page is show.
PS : the properties HelpContextID is available for each VB control.
-
Jun 28th, 2000, 03:09 PM
#4
Thread Starter
Lively Member
Thanks guys. I knew it would be something simple.
Andrew Empson
vb6(ent) SP4
-
Jun 28th, 2000, 03:15 PM
#5
Thread Starter
Lively Member
Oops!
It doesn't seem to want to open my help file. It comes up with a message saying it's invalid or corrupted, but if you press F1, it's fine. Perhaps it's because it's a Compiled HTML Help file rather than a standard windows one? Is there a different method for opening the TOC for this sort of Help file?
Andrew Empson
vb6(ent) SP4
-
Jun 28th, 2000, 03:28 PM
#6
Frenzied Member
Whoops!
I don't know about html help.
You could cheat and do:
Code:
Private Sub mnuHelp_Click()
SendKeys "{F1}"
End Sub
-
Jun 28th, 2000, 03:31 PM
#7
Thread Starter
Lively Member
Thank you Mark. That works like a charm. A very Zen approach.
Andrew Empson
vb6(ent) SP4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|