Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 11,190 times

Related Categories

Show the contents of a HTML Help file

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 the contents panel.

Public Function SetHTMLHelpStrings() As String
    '// this presumes the help file is in the same directory as your app, and Main is the name of the window
    SetHTMLHelpStrings = App.Path & "TestHTMLHelp.chm" & ">Main" 
End Function

To display the contents, use this code (from a form, otherwise you will need to change the hwnd value that is passed):

Public Sub HTMLHelpContents()
  ' Force the Help window to display
  ' the Contents file (*.hhc) in the left pane
  htmlhelp hwnd, SetHTMLHelpStrings(), HH_DISPLAY_TOC, 0

End Sub

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments