Library code snippets
Show a HTML Help topic by Context ID
By James Crowley, published on 14 Jul 2001
When using a HTML help file, you will obviously want to be able to display certain pages or sections. This code shows you how to display a topic in the help file by specifying the context id.
Public Sub HTMLShowTopic(lngTopicID As Long)
' Force the Help window to load a specific topic.
' The Help window will synchronize the
' Contents display automatically
htmlHelpTopic hwnd, SetHTMLHelpStrings(), HH_HELP_CONTEXT, lngTopicID
End Sub
To call it , use this code:
HTMLShowTopic 1000 '// 1000 = Context ID
Related articles
Related discussion
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
-
VB6 compatability from XP to Vista
by bronx (1 replies)
-
Fully justify code
by fresh (0 replies)
Declare Function GetDesktopWindow Lib "User32" () As Long
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
Const HHHELPCONTEXT = &HF
Public Sub ShowHelpContext(plngContextID As Long)
Dim hWnd As Long
Dim lshelpFile As String
Dim hwndHelp As Long
hWnd = GetDesktopWindow
lshelpFile = "C:\Help.chm"
' do not replace lshelpFile with a function call
hwndHelp = HtmlHelp(hWnd, lshelpFile, HHHELPCONTEXT, plngContextID)
End Sub
This thread is for discussions of Show a HTML Help topic by Context ID.