我做了一个帮助文件。
在VB中想调用它请问怎么做啊??
这样它报错。Shell ("c:\图书管理系统\图书管理系统\图书销售系统帮助文件.chm")
这样也不行。Shell (App.Path &  & "\图书销售系统帮助文件.chm")
请问应该怎么做啊??
在线等有正确答案就结贴。

解决方案 »

  1.   

    要这样才行:
    shell "hh.exe " & App.Path & "\图书销售系统帮助文件.chm", vbNormalFocus
      

  2.   

    先声明api
    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 
    在VB中使用语句如下
    Dim m_Value As Long 
    m_Value = htmlhelp(form1.hwnd, "这里是帮助文件的路径",  0, 0) 
    If m_Value = 0 Then MsgBOX "无法打开帮助文件!"
    End If
      

  3.   

    Dim A As Long
                A = ShellExecute(0, "open", App.Path & "\help.chm", "", "", SW_SHOWNORMAL)
    模块:
    Public 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
    Public Const SW_SHOWNORMAL = 1^_^
      

  4.   

    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 
    在VB中使用语句如下:
    Dim m_Value As Long 
    m_Value = htmlhelp(form1.hwnd, "这里是帮助文件的路径", 0, 0) 
    If m_Value = 0 Then MsgBOX "无法打开帮助文件!"
    End If