Creating HTML Help

Contents Files

The contents files allow you to create a structure so that the user can navigate around your help file. Below is an example.

So, first, click on the Contents tab in your HTML Help Workshop. The following dialog will be displayed:

This appears because we have not yet created a contents file. Click OK and one will be created for you. Save it in the root folder (not in the html folder), using the default name provided. 

If you want to use books (like in the window above), instead of folders, then click the properties button, and un-check the 'Use folders instead of books' option. 

To create a new folder (or book), click the or the icon, depending on if the 'Use folders instead of books' option is selected. Then, the window below is displayed:

Enter a Title for the folder or book, I have called mine Test Book 1. As we do not want a file to be displayed when the folder is selected, do not add a file to be displayed. If you want to at a later stage, click Add, and specify the file you want to be displayed. Click OK. If you wish, there are some other images you can use for each folder. Click the edit button , and try changing the Image Index property under Advanced.

Now, we need to add some items, or topics to the list. First, click the or the button (depending on whether you are using folders or books). Click yes to the MsgBox. The same dialog as above will be displayed. Enter Welcome into the Entry Title text box. Then, click Add, so that we can specify a file to be displayed. There are currently no files listed in the next dialog, as we have not yet compiled the project with the contents file included. Click Browse, and select the home.htm file in the html folder. 

Then, click OK on all of the open dialog boxes. You should now see something like this:

Now, select Test Book 1, and using the Add buttons, add the two other html files to it:

If you need to move folders and/or items around, simply use the arrow buttons:

.

Then, display the Window properties (click on the Project tab, and click the Windows button). Then click the Files tab in the dialog that is displayed, and change TOC to Table Of Contents.hhc (or whatever you saved the contents file as). Save all the files, and press compile. Something like this should now be displayed:


Index Files

The index files allow you to create a list of keywords, so that when a user clicks a keyword, the appropriate topic is displayed. Here is an example:

First, click New on the File Menu, and select Index tab. A dialog will be displayed asking if you want to create a new one, select that 'Create a new Index file' and click OK. Save the file as Index.hhk in the rootdirectory. If you wish, you can click the properties button , and change the font that is used. 

To create a keyword, click the new keyword button . Enter the keyword, and then click add to assign the related file to it.

If you add more than one file, then a dialog like this will appear when the user clicks on it:

Now, go back to the project tab, and click the Window properties again. Go to the Files tab, and set Index to Index.hhk (or whatever you saved the index file as). Save your project, and compile! You have now got a fully featured HTML Help File. However, obviously, you will need to actually create some true topics, then assign keywords, and create a contents structure.

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.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor