Results 1 to 4 of 4

Thread: HTML -help

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2001
    Location
    Skandinavian
    Posts
    51

    HTML -help

    Hi, i have try use HTML help in my vb. Can anybody show a simply code how it make ?

    Thank you.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Public Declare Function HtmlHelp Lib "Hhctrl.ocx" _
    2.     Alias "HtmlHelpA" (ByVal hWndCaller As Long, _
    3.     ByVal pszFile As String, ByVal uCommand As Long, _
    4.     ByVal dwData As Long) As Long
    5. Public Const HH_DISPLAY_TOPIC = &H0
    6. Public Const HH_HELP_CONTEXT = &HF
    7.  
    8. Public Function LaunchHTMLHelp(HelpFile As String, _
    9.     Optional WindowHandle As Long, Optional Topic As Long) As Boolean
    10.  
    11.     'HelpFile - the path to your HTML help file.
    12.     'WindowHandle - an optional handle to the window
    13.     '               that the help stems from. When
    14.     '               that window is closed, help will
    15.     '               also close (only when compiled).
    16.     'Topic - the help topic number you wish to call from
    17.     '        your help file, if any. AKA context number.
    18.  
    19.     Dim lngReturn As Long
    20.  
    21.     If Len(Dir(HelpFile)) > 0 Then
    22.        
    23.         If Topic = 0 Then
    24.             lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_DISPLAY_TOPIC, 0)
    25.         Else
    26.             lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_HELP_CONTEXT, Topic)
    27.         End If
    28.        
    29.         LaunchHTMLHelp = CBool(lngReturn)
    30.    
    31.     End If
    32.  
    33. End Function
    -= a peet post =-

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2001
    Location
    Skandinavian
    Posts
    51
    Originally posted by peet
    VB Code:
    1. Public Declare Function HtmlHelp Lib "Hhctrl.ocx" _
    2.     Alias "HtmlHelpA" (ByVal hWndCaller As Long, _
    3.     ByVal pszFile As String, ByVal uCommand As Long, _
    4.     ByVal dwData As Long) As Long
    5. Public Const HH_DISPLAY_TOPIC = &H0
    6. Public Const HH_HELP_CONTEXT = &HF
    7.  
    8. Public Function LaunchHTMLHelp(HelpFile As String, _
    9.     Optional WindowHandle As Long, Optional Topic As Long) As Boolean
    10.  
    11.     'HelpFile - the path to your HTML help file.
    12.     'WindowHandle - an optional handle to the window
    13.     '               that the help stems from. When
    14.     '               that window is closed, help will
    15.     '               also close (only when compiled).
    16.     'Topic - the help topic number you wish to call from
    17.     '        your help file, if any. AKA context number.
    18.  
    19.     Dim lngReturn As Long
    20.  
    21.     If Len(Dir(HelpFile)) > 0 Then
    22.        
    23.         If Topic = 0 Then
    24.             lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_DISPLAY_TOPIC, 0)
    25.         Else
    26.             lngReturn = HtmlHelp(WindowHandle, HelpFile, HH_HELP_CONTEXT, Topic)
    27.         End If
    28.        
    29.         LaunchHTMLHelp = CBool(lngReturn)
    30.    
    31.     End If
    32.  
    33. End Function

    Thank you,
    Tweety99

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Anytime Tweety99
    -= a peet post =-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width