You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.5 KiB

Public Class HHctrlapi
Dim DummyControl As New Control()
Dim MyHelpProvider As New HelpProvider()
Const SW_MAXIMIZE As Integer = 3
Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Int32, ByVal ByValnCmdShow As Int32) As Int32
Public Sub New()
MyHelpProvider.HelpNamespace = Application.StartupPath + "\EDOKA-Hilfe.chm"
End Sub
Public Function ShowHelpTopic()
Help.ShowHelp(DummyControl, MyHelpProvider.HelpNamespace)
End Function
Public Function ShowHelpToc(ByVal context As String)
Help.ShowHelp(DummyControl, MyHelpProvider.HelpNamespace, context + ".htm")
End Function
Public Function ShowHelpIndex()
Help.ShowHelpIndex(DummyControl, MyHelpProvider.HelpNamespace)
End Function
Public Function ShowSearch()
Help.ShowHelp(DummyControl, MyHelpProvider.HelpNamespace, HelpNavigator.Find, "")
End Function
'm_pszHelpFilePath = Application.StartupPath + "\benudok.chm"
'Dim searchit As HH_FTS_QUERY
'searchit.cbStruct = Len(searchit)
'searchit.fUniCodeStrings = 0&
'searchit.pszSearchQuery = ""
'searchit.iProximity = 0&
'searchit.fStemmedSearch = 0&
'searchit.fTitleOnly = 0&
'searchit.fExecute = 0&
'searchit.pszWindow = ""
'HTMLHelp_Search(0&, m_pszHelpFilePath, HH_DISPLAY_SEARCH, searchit)
'Public Const HH_DISPLAY_TOPIC As Short = &H0 ' select last opened tab, [display a specified topic]
'Public Const HH_DISPLAY_TOC As Short = &H1 ' select contents tab, [display a specified topic]
'Public Const HH_DISPLAY_INDEX As Short = &H2 ' select index tab and searches for a keyword
'Public Const HH_DISPLAY_SEARCH As Short = &H3 ' select search tab and perform a search
'Public Const HH_HELP_CONTEXT As Short = &HF ' display mapped numeric value in dwData
'Private Const HH_FTS_DEFAULT_PROXIMITY = (-1)
'Public Structure HH_FTS_QUERY
' Public cbStruct As Integer ' Sizeof structure in bytes.
' Public fUniCodeStrings As Boolean ' TRUE if all strings areunicode.
' Public pszSearchQuery As String ' String containing the search query.
' Public iProximity As Long ' Word proximity.
' Public fStemmedSearch As Boolean ' TRUE for StemmedSearch only.
' Public fTitleOnly As Boolean ' TRUE for Title search only.
' Public fExecute As Boolean ' TRUE to initiate the search.
' Public pszWindow As String ' Window to display in
'End Structure
'Private m_pszHelpFilePath As String
'<System.Runtime.InteropServices.DllImport("hhctrl.ocx", CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _
'Public Shared Function HtmlHelp(ByVal hwndCaller As System.Runtime.InteropServices.HandleRef, <System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> ByVal pszFile As String, ByVal uCommand As Int32, ByVal dwData As Int32) As Int32
'End Function
'Public Declare Function HTMLHelp_BaseCall Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hWnd As IntPtr, ByVal lpHelpFile As String, ByVal uCommand As Int32, ByVal dwData As Int32) As Int32
'Public Declare Function HTMLHelp_Search Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hWnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByRef dwData As HH_FTS_QUERY) As Int32
' HTMLHelp_BaseCall(IntPtr.Zero, Application.StartupPath + "\benudok.chm", HH_DISPLAY_TOPIC, 0)
' HTMLHelp_BaseCall(IntPtr.Zero, Application.StartupPath + "\benudok.chm", HH_DISPLAY_INDEX, 0)
End Class