Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    Unanswered: how to make a .hlp file

    can anyone plz tell me how to create a help file. i've to use it in my vb proj.

  2. #2
    Join Date
    Mar 2004
    How to Make a Help file for your program.

    1. Programs that you will need.
    You will need the standard HC.exe(Help Compiler(DOS)) or HCW.exe(Help Compiler Windows) that should have come with Visual Basic(HCW is not availiable free on the web like HC is). With HC, you need to make your own .HPJ(Help Project Files) . With HCW you now can make your .HPJ and .CNT(Help Contents Files) files from right within HCW and then use it to compile as well.Contents file are not supported by Windows 3.1 Help. Besides this you will need a program like MS Word or WordPerfect that fully supports the RTF document format. WordPad does not unfortunately. There are many products that do most of the work for you, I have compiled a list of places to obtain sample or free/shareware products that do this.
    Also if you want graphics you can just use .BMP, .DIB, or .WMF files. Shed(a program) will let you create an image map file in your help file for linking into this or other help files by clicking on hotspots in the image. Examples: a toolbar in your help files that different parts of this image will take the user to different parts of your help file or a screen shot of your program to explain what's in the screen shot. There is no scripting to be done on your part. This is all contained within the easily made .SHG file.
    Before you go any further you should take a look at the Online Help Files on designing and planning your help file. They are a little confusing but they give you an idea on how to do this. Also take a look at some or all of the help files on your system.(do a search in for *.HLP on all drives) Take a look at how they did things. Decide what you like and what you don't like. When you have an idea of what you want, go to the next stage.

    2. Programs that do the work for you
    There are many programs that will make this process very easy and hide just about every detail discussed below. Because they are there, I have compiled a list of quite a few programs.

    3. How to make Topics in your RTF file.
    First, let me explain what this means(I had the hardest time understanding this). A Topic must be the first line in each page of your help file(I don't mean pages like how many when printed. I mean between each Hard Page break that separates the Topics). Normally this would be large and Bold. Also a Topic is a page in your help file(Though Topics can share the same page). Between each page there should be a Hard Page Break (Go to Insert|Page Break).
    To make a Topic first Decide what Phrase or Word is to become a Topic(must be first line in Topic File).Now, move the cursor before this phrase/word. Go to Insert|Footnote. When it ask what to use for numbering, choose custom and put a # (In Word 95/7 at least, a new window opens across the bottom.). Now in the footnote window enter a word or acronym to represent this topic(This is the Topic ID). Example: If the topic is "How to Make a Help File" you could use "makehelp" in the footnote. "makehelp" is that topics Topic ID.
    If you are confused as to why your making Topics right now, know that you will need these in the next section to create links so the user can get to the different pages of the document.

    4. How to Make Links in your RTF file
    To make a link,and have it work, make sure you have a Topic for it to go to. Go to the word or words that you want to use for your link and highlight it. Go to Format|Font and then in the underline drop down choose Double. Push OK. Now position the cursor immediately after(no spaces) the Double underlined text. Now type the Topic ID of the Topic you want to jump to. Highlight this Topic ID and go back to the Format|Font menu. Undo the underline and set the hidden attribute(This is very messy to undo so make sure you have it right the first time). Push OK. Now, go back to the Format|Font menu and unchoose the hidden attribute. Push OK. Good Job!
    You can also use this to make a picture into a link. If you want parts of the picture to take you to different places, look here. Instead of placing the double underline under some word or words, place it under the picture and follow the rest of the directions.
    Links are the Key jumping around in your help file. In most help files there is a Table of Contents Page that has a Outline style link to every section in your help file. Also from every Topic or Page you probably want to provide a link back.I know there is a BACK button on the Help Toolbar but do it anyways. Users like it, and that's what important.(If you made this program for personal use and you don't care about the users opinion, then why the hell are you making a help file?)

    OK, this is the easiest part. Really!(sometimes...)Simply choose the picture you want to use. Valid formats are .DIB, .BMP, .WMF, .SHG, and .MRB. When you insert a picture in a RTF file you have the option of either actually putting it in the RTF file or linking to the picture. Actually putting it in is the easiest way ,go to Insert|Picture and make sure to insert picture not link. You can't do this with .SHG files, HotSpot files(.SHG) must be linked. Linking makes your help file smaller ONLY if you use the same picture more then once. Example: If you had a custom toolbar on every page or a custom bullet graphic instead of the default dot.
    To Link(this isn't the same as the Topic Links discussed above) a file you apparently can't use the regular windows insert Graphic procedure. To Link to a picture you need to use {bmx aname.bmp}(x being c, l or r)or similar in the location where you want the Picture. Unfortunately you can't see how the Picture looks until after compiling. BMC means the picture is on the baseline of the text next to it and treated like a regular character(just, normally, bigger). BML means the picture is along the left margin and any text is wrapped along the pictures right side. BMR is the reverse of BML, right margin and text is wrapped along left side. in BML and BMR text is aligned with the top of the picture.
    If you use 16 color bitmaps you can make the White color in the picture transparent by putting a "t" after the c, l or r with no spaces in between. This can be useful if your Help file backround isn't white or the same backround color of your pictures.
    This command is the Key to making Multiple Color Depth Bitmaps. If you try using MRBC for this your help file will grow in size when compiled. In order to use this for multiple color depth bitmaps use the {bmx }command like this: {bmx 2color.bmp;16color.bmp;256color.bmp} The Help File Program will automatically use the highest color depth that the users monitor supports.(You don't need to name your files this way but I believe the order should be the same).
    If you linked your pictures, you need to go to your .HPJ file and add the line, in the options section,(or edit the line) BMROOT= to point to the Dir where the Pictures are. You can use absolute or relative directories. If the pictures are in multiple directories you need to separate the paths with a comma,",". When using relative Directories use syntax like this: BMROOT=.\BMP, .\SHG, .\MBR.

    6. Making Multiple Resolution pictures.
    If you know your users are going to be viewing your program on either a EGA, CGA, VGA, or 8514(SVGA) type monitor you will want to look into making MRB files with your pictures. EGA only supports a small monitor resolution and no one using Windows should have this. CGA is a little better, I believe this supports 320x240 but still almost no one should be using this, even on Windows3.1. VGA is what everyone uses basically so you want to include this if your going to the trouble of using this for other formats. 8514 is SVGA. This supports up to 1600x1200(bigger?). The only reason I could see to use this is to create bigger bitmaps than VGA supports, for the SVGA resolutions.
    MRB files should not be used to make Multiple color depth pictures. This will bloat the size of your final compiled Help File. The {bmc } command supports Multiple Color Depth bitmaps and allows for alot smaller Help Files.

    7. Making Pictures with HotSpots
    I am not going to tell you how to use SHED. Basically you should have this program if you have the MS Help compilers. I believe HC (the Win3.1 version) has it. I know HCW (the Win95 version) has it. What I am going to do is tell you what to do with these files once you have them made. Also why to make them and for what.
    SHG files are pictures that have Hotspots. On the web this is mimicked by image maps(which are often used for toolbars). You can use it for this too. You can also use a screen shot of your program to allow the user to understand your interface. You basically use this when you want a picture to have different portions of it take the user to different parts of your help file. If you just want to use a single picture as a link you do this with topic links.
    These files have to be linked into your help file using the {bmx} command. There is no scripting. All of this is internal of the .SHG file.


    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts