For simple programs, you don't really need the full power of Microsoft's Help Compiler. In fact, your help system could end up bigger than your application. Using EasyHelp, you can quickly create a help system for your programs, simply by modifying your documentation files to create just the help your user needs.
SHAREWARE INFO
While EasyHelp isn't Shareware (It's free!), your program may have a shareware request. You can add this to EasyHelp, just as you create the text in your documentation.
LICENSE INFORMATION
You'll want to include licence information for your programs. Here's the way to do it that just makes good sense. Simply include the same licence information that's in your documentation. Your user can simply view it with EasyHelp's simple, easy to access screen. To use EasyHelp, you don't need a license at all. I've placed it in the public domain.
LIMITATIONS
EasyHelp is limited to a total file size of 64K. That isn't my limit, it's VB's. If your help information is larger than that, then you probably need the hypertext tools available in the Microsoft Help Compiler.
FILES
To use EasyHelp, you need two files, the help text and an index file, both of which you create yourself. For this demo version, the files are named EZHELP.HLP and EZHELP.IDX. It's obvious which one is which.
File Names
You can call these files any name you like. Filenames are specified in Form2_Load.
File Locations
When developing, store the files named above in your VBASIC directory. Then, when using the final, compiled version, store the files in the home directory of the application. Since the files are named in the source code, it's easy for you to change the names as you wish.
FILE FORMATS
EZHELP.HLP
This is the main help file for the program. It must be an ASCII file, with carriage returns only at the ends of paragraphs. All word processors can save files in this format. I advise that you place headings frequently in the file. You'll use these to create your index. What seems to work best is headings in all caps for major headings, then headings in initial caps for subheadings.
EZHELP.IDX
This index file is simple. You simply include the terms you want to index, one term per line. You must match case exactly in this version, although it's a simple matter to use Ucase$ and Lcase$ to change this if you like. To make the system easy for your users, try using the headings and subheadings from your .HLP file to make up the index.. You can also add other key words if you like, but remember that EasyHelp starts each search from the top of the file, so any index keys must be unique.
Sample
Here's a sample of the format:
INTRODUCTION
SHAREWARE INFO
FILES
File Names
File Locations
FILE FORMATS
As you can see, this format makes sense to the user, since major headings are in all caps, while subheadings use initial capital letters. Naturally, you can extend this as far as you like.
Caution: Be sure that your index and text entries are identical. The easiest way to do this is by cutting and pasting entries from your .HLP file directly into the index.
INDEX ORDER
It's a good idea to organize your help index in the same order that the headings appear in your help file. If this matches the organization of your documentation files, your user will understand your system immediately.
SORTING
EasyHelp's index box is unsorted. This means that you're responsible for the order in which your titles appear. Naturally, you can set the Sorted property to -1(TRUE) and let VB handle your sorting. In this case, however, you'll lose the heading/subheading structure.
HOW EASYHELP WORKS
For You
All you have to do is add this form and a Help Button, menu command, or <F1> keystroke to your project. Use the Add New File command to bring in the Form1 form. That's all you need. Go into the Form_Load code and alter the filenames to suit yourself, but remember to have the files in the VBASIC directory, or supply path information.
For Your User
Your use just clicks your help button or command, or presses <F1>. The EZHELP form loads and the user clicks once on a topic. EasyHelp jumps to the top of the help text, then searches for the selected topic, highlighting it.
FIRST LOAD
The first time the EZHELP form loads, it must set up the Topic List box and load the help file into the right-side text box. This takes a few seconds. From then on, though, unless you choose to Unload the form, access is almost instantaneous.
LEAVING EZHELP
Your user simply clicks on the [Return] button to resume work in your application. You can, of course offer more options. This is simply an outline of what can be done with this concept.
SUGGESTED ADDITIONS
Find Next
You could add a [Find Next] button or command to the form, searching for the next occurrence of the topic. If you do this, simply skip the line in the search routine which sets the Text1.SelStart position to 0.
Finding User-entered Text
Give your user an Input Box or some other way to enter text of his or her own, then take off to the search routine. Again, jump to SelStart=0 to search from the beginning of the file, or skip that line to continue from the current position.
Context-sensitive Help
I haven't included this feature in this simple example. To do it, just pass the topic as a variable to this routine, then use the search routine to find it. It's that easy.
MAKING CHANGES
Hey, it's your program. Do whatever you want.
SUPPORT
There really isn't any. But you can reach me on CompuServe in the MSBASIC forum. I'm there just about every day. My address is 71571,222.