VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



HTMLHelpLauncher

by Neil Ault (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (10 Votes)

Allows you to show the new compiled HTML help files (.chm) within a vb application.

Inputs
The filename of the compiled HTML help file.
Code Returns
The window handler of the help file.

Rate HTMLHelpLauncher

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~ SUBJECT:   HTML Help Launcher
'~~~ AUTHOR:   Neil Ault ([email protected])
'~~~ CREATED:   11/07/2000
'~~~
'~~~ DESCRIPTION: Allows you to launch the new compiled HTML help
'~~~       files (.chm) within your visual basic apps. You
'~~~       need to have the file hhctrl.ocx installed on
'~~~       your machine which normally comes with Internet
'~~~       Explorer.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Option Explicit
Private 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
'Constants used by HtmlHelp
Const HH_DISPLAY_TOPIC = &H0
Const HH_SET_WIN_TYPE = &H4
Const HH_GET_WIN_TYPE = &H5
Const HH_GET_WIN_HANDLE = &H6
Const HH_DISPLAY_TEXT_POPUP = &HE   'Display string resource ID or text in a pop-up window.
Const HH_HELP_CONTEXT = &HF      'Display mapped numeric value in dwData.
Const HH_TP_HELP_CONTEXTMENU = &H10  'Text pop-up help, similar to WinHelp's HELP_CONTEXTMENU.
Const HH_TP_HELP_WM_HELP = &H11    'Text pop-up help, similar to WinHelp 's HELP_WM_HELP.
'Opens the compiled help file
Private Sub ShowHelpFile(strFilename As String)
Dim hwndHelp As Long
  'The return value is the window handle of the created help window.
  hwndHelp = HtmlHelp(hWnd, strFilename, HH_DISPLAY_TOPIC, 0)
End Sub

Download this snippet    Add to My Saved Code

HTMLHelpLauncher Comments

No comments have been posted about HTMLHelpLauncher. Why not be the first to post a comment about HTMLHelpLauncher.

Post your comment

Subject:
Message:
0/1000 characters