Home > Archive > Visual Basic > September 2004 > Display CHM help file
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Display CHM help file
|
|
| Brian K. Sheperd 2004-09-22, 3:55 pm |
| Hello,
Is there a way to display a .chm help file in VB6? I was trying to make a
menu option for help, but I wasn't sure how to display the file (i.e., shell
statement or something). Or is there a better way to display help
information in VB?
Thanks,
Brian
| |
|
|
"Brian K. Sheperd" <brians.remove@remove.lesker.com> wrote in message
news:ezDGrNLoEHA.2140@TK2MSFTNGP11.phx.gbl...
> Hello,
>
> Is there a way to display a .chm help file in VB6? I was trying to make a
> menu option for help, but I wasn't sure how to display the file (i.e.,
shell
> statement or something). Or is there a better way to display help
> information in VB?
VB6 supports .chm files. Therefore, you should only need to assign your .chm
file to "Help File Name" in Project Properties or to the App object's
HelpFile property at runtime. In order for a menu to display Help, you need
to add context IDs to your help file and specify that ID for the
HelpContextID property of the menu item. This ID could be for a contents
page of your help file.
I suggest you consult the topic "Adding Help to Your Application" in MSDN
Library. Here's a link to the online version of it:
http://msdn.microsoft.com/library/e...Application.asp
Mike
| |
| Steven Burn 2004-09-22, 3:55 pm |
| Check out the ShellExecute API (tis what I use, and it works without any
problems.... aslong as you also use a FileExists routine (to make sure the
user actually has the file you want to launch).
E.g.
'// Assumes: FileExists function is present
'// Declaration
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
'// Form code
If FileExists(app.path & "\help.chm") Then
ShellExecute hwnd, "open", app.path & "\help.chm", vbNullString,
vbNullString, vbNormalFocus
Else
MsgBox "Error: Help file's not present"
End If
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"Brian K. Sheperd" <brians.remove@remove.lesker.com> wrote in message
news:ezDGrNLoEHA.2140@TK2MSFTNGP11.phx.gbl...
> Hello,
>
> Is there a way to display a .chm help file in VB6? I was trying to make a
> menu option for help, but I wasn't sure how to display the file (i.e.,
shell
> statement or something). Or is there a better way to display help
> information in VB?
>
> Thanks,
> Brian
>
>
| |
| Brian K. Sheperd 2004-09-22, 3:55 pm |
| Mike/Steven,
Thank you for the responses.
Thanks again,
Brian
"Brian K. Sheperd" <brians.remove@remove.lesker.com> wrote in message
news:ezDGrNLoEHA.2140@TK2MSFTNGP11.phx.gbl...
> Hello,
>
> Is there a way to display a .chm help file in VB6? I was trying to make a
> menu option for help, but I wasn't sure how to display the file (i.e.,
shell
> statement or something). Or is there a better way to display help
> information in VB?
>
> Thanks,
> Brian
>
>
| |
|
| Adding to the pile:
HTML Help Center:
http://www.mvps.org/htmlhelpcenter/
Contains VB code for dealing with CHM files:
http://www.mvps.org/htmlhelpcenter/...p/hhvbclas.html
--
Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
--
"Brian K. Sheperd" <brians.remove@remove.lesker.com> wrote in message
news:ezDGrNLoEHA.2140@TK2MSFTNGP11.phx.gbl...
> Hello,
>
> Is there a way to display a .chm help file in VB6? I was trying to make a
> menu option for help, but I wasn't sure how to display the file (i.e.,
shell
> statement or something). Or is there a better way to display help
> information in VB?
>
> Thanks,
> Brian
>
>
|
|
|
|
|