Library code snippets
Show a HTML Help topic by Context ID
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
-
Problem with migration to C# (CoCreateInstanceEx)
by LRollison (1 replies)
-
VB6 Problem Creating Shortcuts
by rb1177 (0 replies)
-
how can i open a file
by kyawswarhtun (0 replies)
-
how to save any one form what i want?
by blackguy (5 replies)
-
Build an MP3 Player
by soybees (4 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
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 HH_HELP_CONTEXT = &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, HH_HELP_CONTEXT, plngContextID)
End Sub
This thread is for discussions of Show a HTML Help topic by Context ID.