Library tutorials & articles

Creating HTML Help

The Project File (2)

First, we need to create a window that will display our help file. Click the Add/Modify Window Definitions button . Enter Main into the dialog that is displayed, and click OK. Then the window below is displayed.

 

BUG 2
If you have Version 1.1, you cannot remove a window by pressing the Remove button! You get a wonderful message informing you that 'This functionality has not yet been implemented'. To get around this, save and close the project. Then open the file in notepad, and delete the appropriate line under the [Windows] section.

The Window type is the name of the Window you have just created. Set the Title bar text to something like Notepad Help. Next, click the Buttons tab.

The buttons specified correspond to the buttons displayed across the top of the compiled Help file in the toolbar:

These buttons can be defined as follows:

  • Hide - Hides the navigation Pane.  When the pane is hidden, this becomes the Show button.

  • Back - Move to the previously-viewed topic in this session.

  • Forward - If Back has been used, moves to the next-viewed topic in this session.

  • Stop - Stops the loading of any topic or web page in the viewer.

  • Refresh - Refreshes the current page from the source.

  • Home - Go to the page specified in the definition.

  • Print - Prints the current page.

  • Options - Presents the user with a menu of the other buttons.

  • Jump 1 - User-defined button.

  • Jump 2 - User-defined button.

Select the options you want. Next, click the Position tab. This allows you to specify the size and location of the help window. You can use the Autosizer to manually adjust where the window starts. For the tri-pane window, I normally set the width property to 640, and the height property to 440, making it slightly smaller than the standard 640 x 480 resolution, so the people with that setting don't experience problems. The Left and Top settings are at 0 so that the window is displayed in the corner of the screen.  

The Files tab allows you to specify the files you will use in your project:

  • TOC - File containing the entries for the Contents tab (HHC extension).

  • Index - File containing the entries for the Index tab (HHK extension).

  • Default - The topic to be displayed when the window first opens (HTML extension).

  • Home - The topic HTMLHelp displays when the Home button is clicked (HTML extension).

  • Jump 1 - The topic HTMLHelp displays when the Jump 1 button is clicked.

  • Jump 2 - The topic HTMLHelp displays when the Jump 2 button is clicked.

Don't worry about any of these at the moment, we will specify them later. Finally the Navigation Pane:

This tab allows you to specify what tabs are shown in the help window, and if it is a tri-pane (ie with Toolbar, nav pane and topic pane). Check the Window with navigation pane box, and ensure that Table of contents is selected in the Default tab frame. This specifies that the Table of contents will be the tab that is selected when the window is first displayed. 

Also check the Auto sync check box. This ensures that when the window is displayed, the Table of contents is displaying the current topic. You can also check the Add Search Tab check box, as this will allow your users to search your HTML Help File. Note that if you check this box, you need to check the Compile Full Text search in the Options Dialog (see below). If you wish, you can specify the Navigation pane width too.

Now you need to specify some project options. Click the Project Properties icon . The following dialog will be displayed. 

Set the title to "Test HTML Project" , and set the Default Window as Main (the window you just created). If you checked the Add Search Tab option in the Window Properties dialog, then click Compiler, and select the 'Compile Full Text search information' check box.

Comments

  1. 29 Aug 2009 at 13:32

    Absolutely wonderful - before finding this I've spent hours trying to pick my way through this topic - thanks

  2. 10 Mar 2008 at 05:33

    hi,

    i sent u how retrive the file

    if you want how to create and the rest of the process, pls give some time

    bye

     

  3. 10 Mar 2008 at 05:31

    HI, i found this is the one of of the way we can creat and its very simple;

     

    System.Diagnostics.Process process = new System.Diagnostics.Process();process.StartInfo.FileName = System.AppDomain.CurrentDomain.BaseDirectory + "Urfile.chm";

    process.Start();

    This will work definitely.

    BYE

     

     

  4. 29 Sep 2006 at 19:21

    Hi.  I went through your tutorial on creating HTML Help, but keep running into a very basic problem.  After compiling the help file for the first time and opening up the chm file, my home.htm file does not display at all in the right window.  I get the help file window (with the HIDE, BACK, FORWARD, etc. displayed, but the window on the right is blank.  I followed your tutorial step by step, saved the html files in the directories as indicated, etc.  What am I doing wrong?  I receive no error messages or security warnings.  Thanks in advance!

  5. 13 Jul 2006 at 13:51

    Can you give me any detail or any url where I can find about how to create chm files programmatically using C#??

    Thanks in Advance

    Nilesh Gambhava

  6. 12 Jul 2005 at 14:26

    i have tried to make popup in html help but coudn't. can somebody help.

  7. 08 May 2004 at 12:28

    I have kinda the same problem. Showing a topic works for me if the pages are within the chm file, however, if a topic is on a web site,
    even though I can retrieve them by ciking on them, with the HtmlHelp function, both using HHDISPLAYTOPIC and HHHELPCONTEXT..
    the help viewer jumps to the topic, but fails retrieving the page on the content pane. It does seem to synchronize, it doesn shange the content pane, but to a bad page, like it wants it to be within it.. or I don't really know. So please please, someone help me! you know what to do? have seen this?

  8. 10 Jan 2004 at 15:09
    Figured out my problem, because I was frustrated I started changing things needlessly (I know not a good programming troubleshooting technique ) and realized that it is not suppost to be HH_DISPLAY_TOPIC but that it should be HH_HELP_CONTEXT and everything worked just fine.
  9. 24 Dec 2003 at 00:11

    Hi, I read your entire article and it really helped a lot but I can't wrap up what I've made because for some reason the help file just won't show.

    Code:

    Private Sub mnuHelpHowto_Click()
     HTMLShowTopic 1030
    End Sub


    ...


    Public Sub HTMLShowTopic(lngTopicID As Long)


     ' Force the Help window to load a specific topic.
     ' The Help window will synchronize the
     ' Contents display automatically
     htmlhelp hwnd, App.helpfile & ">Main", HHDISPLAYTOPIC, lngTopicID


    End Sub



    I don't quite understand why it will not show the help file, my comp appears to be processing something but in the end it does not show the help file.  If I specify 0 as the lngTopicID it does show the window but at the default topic, not the topic I want it to show.  FYI I have mapped the numbers to a file using the notepad trick.

  10. 06 May 2003 at 08:15

    Great I can use this now I understand it!
    Well Done!


  11. 23 Mar 2003 at 20:58

    I followed the article and it fixed many of my problems but ...
    I'm having problems displaying popup text with textboxes.


    'No help ID matches control ID #...


    Iv'e tested the popup text files outside the app and they're find. My code works with command buttons (only?).


    Any ideas??

  12. 08 Jan 2003 at 02:30

    Excellent topic! this is very helpful, thanks a lot. It has been a great jumpstart for integrating html help file in VB. Hope you can include topics on popups.

  13. 23 Nov 2002 at 15:54

    Absolutley brilliant. Very informative easy to understand and a great enjoyment to read please keep up the good work  

  14. 31 Aug 2002 at 08:02

    Yes i do still have this problem.


    Thankyou for your responce, unfortunatly i still cannot resolve my problem.


    I have looked through some of the links you posted and i will look at the others in more detail when i have more time.


    Thanks again.

  15. 29 Aug 2002 at 21:02

    Stevesoft,


    In the unlikely event that you're still struggling with this problem...


    > I have followed this tutorial and have the following problem:
    >
    > The code for displaying the contents or the index only works after i
    > have pressed F1 to display help.
    >
    > Once i have done this once, the code works fine...... why is this?


    The following are the principal documents on connecting HTML Help to an application. Maybe these will help.


    http://www.smountain.com/mProgrammingHelp.htm (VB, C++)
    http://www.mvps.org/htmlhelpcenter/mapping.htm
    http://www.mvps.org/htmlhelpcenter/whcomplete.htm (VB)
    http://www.workwrite.com/helpthink/vb
    liske.htm (VB)
    http://helpware.net/delphi/index.html (Delphi)
    http://www.workwrite.com/helpthink/delphi_chandler.htm (Delphi)


    Pete

  16. 29 Aug 2002 at 20:55

    rollershade,


    Just came across your message. Here's a very belated follow-up, in the unlikely event you still need this information.


    > the ordinal 373 could not be located in the dynamic link library HHA.dll


    Make sure that all the HTML Help runtime DLLs are properly installed and registered, using either:


    HTML Help DLL Registrar (http://www.helpfulsolutions.com/)
    MJ's Help Diagnostics (http://helpware.net/downloads/index.htm)


    > the link u gave for the microsoft page cant be found


    This was changed a little while ago to http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconHH1Start.asp.


    Pete

  17. 14 Jul 2002 at 16:33

    i have installed it from the vb6 cd , but i try and run the html workshop, and i get this error


    the ordinal 373 could not be located in the dynamic link library HHA.dll


    any ideas, and the link u gave for the microsoft page cant be found

  18. 07 Jul 2002 at 12:36
    I have followed this tutorial and have the following problem:

    The code for displaying the contents or the index only works after i have pressed F1 to display help.

    Once i have done this once, the code works fine...... why is this?

    Stevesoft
  19. 01 Jan 1999 at 00:00

    This thread is for discussions of Creating HTML Help.

Leave a comment

Sign in or Join us (it's free).

James Crowley 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 audience ...

Related discussion

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...

We'd love to hear what you think! Submit ideas or give us feedback