Creating HTML Help

Displaying help from a MsgBox

Displaying help from a Msgbox is really quite simple, using the syntax below:

Msgbox Message, Options + vbMsgBoxHelpButton, DialogTitle, HTMLHelpFilePath & ">" & WindowName, ContextInteger

So, the following code displays a message box like this

MsgBox "Test Error Message Text.", _
    vbOKOnly + vbExclamation + vbMsgBoxHelpButton, _
    "Test Error Message", _
    "C:TestHTMLHelp.chm" & ">Main", 1010

This code presumes the test compiled Help file is saved as C:TestHTMLHelp.chm, and you have the following items in the Project File:

[ALIAS]
IDH_TESTTOPIC2=html est_topic_2.htm

[MAP]
#define IDH_FIND_DIALOG 1010

If you get this:

check the path, and the Window name. If the HTML Help file is displayed, but with just the default page, check the Context Integer value, and the topic it is assigned to. If you have any problems, please contact me.

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic