|
-
Feb 20th, 2002, 04:02 AM
#1
Thread Starter
Addicted Member
VB & *.chm files
Does any of you intelligent people know how to link a html help compiled filed (.chm) into a vb project?
If i have a cmdHelp button how would i call the already created .chm file?
Any ideas??
Please
Please!!
-
Feb 20th, 2002, 04:08 AM
#2
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
ShellExecute Me.hwnd, vbNullString, "C:\WINNT\Help\access.chm", _
vbNullString, "C:\", SW_SHOWNORMAL
End Sub
-
Feb 20th, 2002, 04:20 AM
#3
Bouncy Member
you can link the chm file under your project's properties.
you can also make the chm help file context sensitive.
then once you've done that, you can specifiy help context ID's in your forms, and on your buttons etc.
-
Feb 20th, 2002, 04:30 AM
#4
Thread Starter
Addicted Member
cheers, this works.........but how would i be able to open the help file at a specific point??
Say for example i have ten vb forms all of which have separate .htm files in the compiled help project. how would i associate each form with each separtae .htm file??
is it something to do with the helpcontextID property??
-
Feb 20th, 2002, 04:45 AM
#5
Junior Member
Maybe something like this
Private Const HH_DISPLAY_TOPIC = &H0
Private Declare Function htmlHelpTopic Lib "hhctrl.ocx" _
Alias "HtmlHelpA" (ByVal hwnd As Long, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByVal dwData As String) As Long
and then
Private Sub Command11_Click()
Topic "Logon.htm"
htmlHelpTopic 0, "\\RESRSREDLION002\acl_pd$\People Development Database\PD DB.chm", HH_DISPLAY_TOPIC, File
End Sub
where file is the specific htm file you want to view.
This is from my access 97 database but it might work for you.
-
Feb 20th, 2002, 04:47 AM
#6
Bouncy Member
Originally posted by karolmcauley
cheers, this works.........but how would i be able to open the help file at a specific point??
Say for example i have ten vb forms all of which have separate .htm files in the compiled help project. how would i associate each form with each separtae .htm file??
is it something to do with the helpcontextID property??
spot on.
you create the context ID when designing your help file (how - depends on what you used to make your help file).
You then specifiy a context ID for each form/control etc that you want. then when they press F1 on that control/form it will jump to the relevant page ...
-
Feb 20th, 2002, 05:09 AM
#7
Thread Starter
Addicted Member
Originally posted by darre1
spot on.
you create the context ID when designing your help file (how - depends on what you used to make your help file).
You then specifiy a context ID for each form/control etc that you want. then when they press F1 on that control/form it will jump to the relevant page ...
I am only a recent grad in vb so forgive me for my stupidity! But if i am using HTML Help workshop (downloadable from microsoft), how do you specify a context ID in this when designing your help files?
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
|