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 LongPrivate Sub Command1_Click()
ShellExecute Me.hwnd, "open", "C:\WINNT\Help\ADO210.CHM", "", "", 5End Sub

解决方案 »

  1.   

    先在通用中声明
    Private Declare Function htmlhelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
    然后写
    Private Sub mn_help_Click()
        htmlhelp hwnd, App.Path & "\manual.chm", 0, 0
    End Sub
      

  2.   

    我知道三种方法
    一:
    使用HtmlHelp:
    Const HH_DISPLAY_TOPIC = &H0
    Const HH_CLOSE_ALL = &H12Private Sub cmdOpen_Click()
        Dim hwndHelp As Long
        hwndHelp = HtmlHelp(hWnd, app.path+"readme.chm",HH_DISPLAY_TOPIC, 0)
    end subPrivate Sub Form_Unload(Cancel As Integer)
        HtmlHelp Me.hWnd, "", HH_CLOSE_ALL, 0
    End Sub二:
    工程属性-〉选定帮助文件即可三:
    用ShellExecute.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然后这样调用:
    ShellExecute 0&, vbNullString, App.Path & "\readme.chm", vbNullString, vbNullString, vbNormalFocus
      

  3.   

    shell "hh.exe " & "cch.chm"