Hi, i have try use HTML help in my vb. Can anybody show a simply code how it make ?
Thank you.
Printable View
Hi, i have try use HTML help in my vb. Can anybody show a simply code how it make ?
Thank you.
VB Code:
Public Declare Function HtmlHelp Lib "Hhctrl.ocx" _ Alias "HtmlHelpA" (ByVal hWndCaller As Long, _ ByVal pszFile As String, ByVal uCommand As Long, _ ByVal dwData As Long) As Long Public Const HH_DISPLAY_TOPIC = &H0 Public Const HH_HELP_CONTEXT = &HF Public Function LaunchHTMLHelp(HelpFile As String, _ Optional WindowHandle As Long, Optional Topic As Long) As Boolean 'HelpFile - the path to your HTML help file. 'WindowHandle - an optional handle to the window ' that the help stems from. When ' that window is closed, help will ' also close (only when compiled). 'Topic - the help topic number you wish to call from ' your help file, if any. AKA context number. Dim lngReturn As Long If Len(Dir(HelpFile)) > 0 Then If Topic = 0 Then lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_DISPLAY_TOPIC, 0) Else lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_HELP_CONTEXT, Topic) End If LaunchHTMLHelp = CBool(lngReturn) End If End Function
Quote:
Originally posted by peet
VB Code:
Public Declare Function HtmlHelp Lib "Hhctrl.ocx" _ Alias "HtmlHelpA" (ByVal hWndCaller As Long, _ ByVal pszFile As String, ByVal uCommand As Long, _ ByVal dwData As Long) As Long Public Const HH_DISPLAY_TOPIC = &H0 Public Const HH_HELP_CONTEXT = &HF Public Function LaunchHTMLHelp(HelpFile As String, _ Optional WindowHandle As Long, Optional Topic As Long) As Boolean 'HelpFile - the path to your HTML help file. 'WindowHandle - an optional handle to the window ' that the help stems from. When ' that window is closed, help will ' also close (only when compiled). 'Topic - the help topic number you wish to call from ' your help file, if any. AKA context number. Dim lngReturn As Long If Len(Dir(HelpFile)) > 0 Then If Topic = 0 Then lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_DISPLAY_TOPIC, 0) Else lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_HELP_CONTEXT, Topic) End If LaunchHTMLHelp = CBool(lngReturn) End If End Function
Thank you,
Tweety99
Anytime Tweety99 :)