Implement chm Help in Visual Basic
No attachments for this post
Give your app a more polished appearance by using .chm files for your help system.
First place a existing chm File in the project path. You must know what name your htm pages have to work correct.
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
Sub ShowHtmlHelp(ByVal tHelpFile As String, ByVal tHelpPage As String)
Const HH_DISPLAY_TOPIC =3D &H0
On Error Resume Next
' open the help page in a modeless window
HtmlHelpTopic 0, tHelpFile, HH_DISPLAY_TOPIC, tHelpPage
Put a command button to your form and name it cmdHelp
Private Sub cmdHelp_Click()
'This is only a example
ShowHtmlHelp App.path & "\MyHelp.chm", "Introduction.htm"
This code originally appeared on AndreaVB.com, and has been republished here with the permission of Andrea Tincani.
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.