我们用VB+ACCESS做的系统,还做了个帮助,帮助是用VC++做的,现在的问题是,在VB中显示不出来这个帮助 这个帮助的扩展名为.chm,在VB中怎么show出来一个这样的文件,我明天这个毕业设计就要交了,谢谢大家!

解决方案 »

  1.   

    http://search.csdn.net/Expert/topic/2597/2597047.xml
      

  2.   

    http://search.csdn.net/Expert/topic/2469/2469139.xml
      

  3.   

    '方法一
    Option Explicit
    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
    Private Const SW_SHOW = 5
    '方法二
    Private Declare Function HtmlHelpA Lib "hhctrl.ocx" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, ByVal dwData As Long) As Long
    Const HH_DISPLAY_TOPIC = &H0
    Const HH_DISPLAY_INDEX = &H2
    Const HH_HELP_CONTEXT = &HF
    Const HH_DISPLAY_SEARCH = &H3
    Const HH_DISPLAY_TEXT_POPUP = &HE
    '指定CHM文件的位置
    Private Sub Command1_Click()
        Dim nRet As Integer
            If Len(App.HelpFile) = 0 Then
            MsgBox "没有找到CHM文件", vbInformation, Me.Caption
        Else
            On Error Resume Next
            SendKeys "{F1}"
            If Err Then
                MsgBox Err.Description
            End If
        End If
    End Sub
      

  4.   

    这里有一段源代码http://www.onlinedown.com/Soft/21749.htm
      

  5.   

    谢谢大家,我按照你们告诉我的SHELL方法,解决了问题,毕业设计作的很好,毕业答辩也很顺利,谢谢大家的帮助!我是北大青鸟天津华育国际1期学员,昨天我们1期结业了。