Search Tools Links Login

HTMLHelpLauncher


Visual Basic 6, or VB Classic

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

Original Author: Neil Ault

Inputs

The filename of the compiled HTML help file.

Returns

The window handler of the help file.

Code

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~ SUBJECT:   HTML Help Launcher
'~~~ AUTHOR:   Neil Ault (Neil.Ault@btinternet.com)
'~~~ 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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 126 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.