|
-
Sep 1st, 2001, 12:18 AM
#1
Thread Starter
Member
HTML -help
Hi, i have try use HTML help in my vb. Can anybody show a simply code how it make ?
Thank you.
-
Sep 1st, 2001, 10:52 AM
#2
-= B u g S l a y e r =-
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
-
Sep 1st, 2001, 04:16 PM
#3
Thread Starter
Member
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
-
Sep 1st, 2001, 06:15 PM
#4
-= B u g S l a y e r =-
Anytime Tweety99
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|