How to include Help File in Visual Basic Project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • renpal
    New Member
    • Apr 2006
    • 1

    How to include Help File in Visual Basic Project

    Hello,

    I have created a help file of .chm extension.

    Now i want to include it in my Visual Basic 6.0 Project.

    Please tell me how to do it?
  • CaptainD
    New Member
    • Mar 2006
    • 135

    #2
    If you just want to show the file with Windows default program for the help file you could do something like th following.

    This code snippet came from: http://www.thescarms.com/

    In the general section for your form:
    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
    In a click event:

    Code:
    Call ShellExecute(Me.hwnd, "open", "C:\PathToHelpFile\HelpFile.chm", "", 0, SW_SHOWNORMAL)

    Comment

    Working...