用shell "c:\winnt\hh.exe *.chm"打开,好像是!

解决方案 »

  1.   

    Public Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, dwData As Any) As LongConst HH_DISPLAY_TOPIC = &H0
    Const HH_HELP_CONTEXT = &HF
    Const HELP_TAB = &HFDim lngRtn As Long
    lngRtn = HtmlHelp(Me.hwnd, IIf(Right(App.Path, 1) = "\", App.Path, App.Path + "\") + "help.chm", HH_DISPLAY_TOPIC, 0)
      

  2.   

    shell "c:\windows\hh.exe *.htm"
      

  3.   

    '获取系统目录
    Private Declare Function GetWindowsDirectory Lib "kernel32" _
    Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal _
    nSize As Long) As LongPrivate Sub help_Click()
    Dim winpath As String
    Dim b As String
    Dim p As Integer
    b = Space(260)
    p = GetWindowsDirectory(b, Len(b))
    winpath = Left(b, p)
    Shell winpath & "\hh.exe" & " " & App.Path & "\help.chm", vbNormalFocus
    End Sub
      

  4.   

    liguangyi的例子很好用,我发现有时用hh.exe help.chm不行,提示不能打开,有时又可以