Help File (.HLP)

Could anybody show me how to create help file (.hlp).

Currently I'm writing code using VB4 to call help file as below :-
CommonDialog1.HelpFile = "c:helpme.HLP"
CommonDialog1.HelpCommand = cdlHelpContents

the code working but I don't know how to create help file(customize).
Who is Participating?
delmarConnect With a Mentor Commented:
There are many freeware and shareware help authoring tools available at  IMHO, the best one there is Ed Guy's HELLLP!
You can create .hlp file using Microsoft Help Workshop. I work in VB6 and can only tell you that this workshop comes free with Visual Studio 6.
Classic Style Windows help files are build mainly with two different things.
The first is one or more *.rtf files and the other is a help compiler.
The easy part is the help compiler, because you say which files to compile and the result is an HLP file.
The hard part is writing the rtf (rich text format) files. You can write a document in MSWord and save it as an rtf file, but unfortunately that won't be OK because those versions are incompatible!!
There are several codes that you use to create your keywords and your links, these codes include setting a "k" as footnote in you rtf document. Actually it would be very large to explain here how to write your rtf files,... and it will be probably much work.

I suggest you to find on the Net a freeware or shareware help editor, the most of the times they include a link to the help compiler.
Robohelp is also good.

You can use a plain ASCII editor like notepad to generate the .RTF file. The Help Compiler Workshop (HCW) has a good discussion on .RTF formats for the help .RTF files.

Here is a sample template for a .RTF file suitable for use in a help.


      {\f0\froman Times New Roman;}
      {\f1\froman Symbol;}
      {\f2\fswiss Arial;}
      {\f3\froman MS Serif;}
      {\f4\fswiss MS Sans Serif;}
      {\f5\fmodern Courier New}


This is the online help for
By: Mark M. Lambert
V1.0.0 - 31 Mar 99 - MML - Initial code

Use the following as a template for each topic. In the program
code the .HelpContextID property has a numeric value. Use the
help Authoring tool MAP command to create an association between
the term in the # line and the control in the program.

All of the graphics referenced in this are currently located in:


and are captured using Paint and saved as 256 color .BMP files

$(/footnote Review Inventory Results Button)
#(/footnote Review)
K(/footnote Review;Button, Review)
(/f2 /qr /b Introduction /pard /par)
You use this button to enter the review section of the program.

When using the above template, be sure to strip out the excess
slashes - these are required in the example so as not to confuse
the help compiler

This is the codes necessary to find the high order characters

|f2 |i |b
 |'80 |'81 |'82 |'83 |'84 |'85 |'86 |'87|par
 |'88 |'89 |'8a |'8b |'8c |'8d |'8e |'8f|par
 |'90 |'91 |'92 |'93 |'94 |'95 |'96 |'97|par
 |'98 |'99 |'9a |'9b |'9c |'9d |'9e |'9f|par
 |'A0 |'A1 |'A2 |'A3 |'A4 |'A5 |'A6 |'A7|par
 |'A8 |'A9 |'Aa |'Ab |'Ac |'Ad |'Ae |'Af|par
 |'B0 |'B1 |'B2 |'B3 |'B4 |'B5 |'B6 |'B7|par
 |'B8 |'B9 |'Ba |'Bb |'Bc |'Bd |'Be |'Bf|par
 |'C0 |'C1 |'C2 |'C3 |'C4 |'C5 |'C6 |'C7|par
 |'C8 |'C9 |'Ca |'Cb |'Cc |'Cd |'Ce |'Cf|par
 |'D0 |'D1 |'D2 |'D3 |'D4 |'D5 |'D6 |'D7|par
 |'D8 |'D9 |'Da |'Db |'Dc |'Dd |'De |'Df|par
 |'E0 |'E1 |'E2 |'E3 |'E4 |'E5 |'E6 |'E7|par
 |'E8 |'E9 |'Ea |'Eb |'Ec |'Ed |'Ee |'Ef|par
 |'F0 |'F1 |'F2 |'F3 |'F4 |'F5 |'F6 |'F7|par
 |'F8 |'F9 |'Fa |'Fb |'Fc |'Fd |'Fe |'Ff|par


= Top Level Help

${\footnote Introduction}
#{\footnote Intro}
K{\footnote Introduction}
{\f2 \qr \b Introduction\plain \par}
\{bml icon.bmp\}\par\par

This is the help file for the {\f5 .EXE} program for Windows 95 and NT.\par\par

When the program is initially launched it will appear as:
\{bml main.bmp\}
There are three tabs on the main screen:\par\par
{\f2 \i \b
\tab \'95 \tab Files to be processed\tab Only valid after run\par
\tab \'95 \tab Settings\tab \tab \tab Default screen on startup\par
\tab \'95 \tab Run Log\tab \tab \tab Program history\par
The {\i Settings} tab is the default tab when the program starts. This tab allows you
 to set the configuration of the program as to run time and the directories used by the
 program. When the program is run for the very first time on a machine the directories
 will default to those specified in the SCANFLOW document (see the system master
 documentation file for more details...)
The default directory values are:
{\f2 \i \b
\tab \'95 \tab Files to be processed\tab Only valid after run\par
\tab \'95 \tab Settings\tab \tab \tab Default screen on startup\par
\tab \'95 \tab Run Log\tab \tab \tab Program history\par



= Help for buttons

File Button

${\footnote Exit Button}
#{\footnote Exit}
K{\footnote Exit;Button, Exit}
{\f2 \qr \b Exit Button\plain\par}
\{bml pbtnexit.bmp\}
This button is used to stop playback and exit the program.



Anyway you use the above to build your help. The topics that start with #{\footnote are your topic names. You use the map function in the HCW to associate the HelpTopicID you set in your VB project with the topic names. If you set the name of the help file as part of the VB project properties your help file will pop anytime someone hits <F1> without you having to code anything.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.