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)
shell "c:\windows\hh.exe *.htm"
'获取系统目录 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
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)
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