Online Help File
External Links
  Online Help File  
  The Time2HELP help file is available online.  
  Order Time2HELP  
  Order Time2help and pay by credit card, check or bank transfer.  
  Order online from Kagi.  
  Download trial version  

Download the 30 day trial version of Time2HELP now.



From Vision to Code - Built by Delphi


Painless Documentation
for your Source Code
    Home   Features  Download   Support   News   Order   

Integrate a Help file with Delphi's Help

Integrating with Delphi 7, 6, 5 and 4
Time2HELP generates the necessary A-keywords (as well as many K-keywords), which Delphi uses for context sensitive help from within the IDE. If Compiler Version is set to 'Delphi 6' or later, Time2HELP also generates an .als file necessary for integrating help files with these versions of Delphi.

To get context sensitive help, what you (or your library/component users) must do is to either add the K-keywords of your help file to Delphi's index, or just link to it. A detailed description on this can be found in the following two topics:

Preparing the help file for integration with Delphi IDE
Adding the help file to the Delphi IDE

Integrating with Delphi 3
To get context sensitive help in Delphi 3, you must add the K-keywords of your help file to Delphi's index by using an ":Index" statement, or link to it by using a ":Link" statement.
One way to do this is to open the Delphi3.cnt file (in the Delphi\Help directory), and add an 'index' statement to its index section.

:Base delphi3.HLP>main
:Title Delphi Help

; Index section
:Index VCL Object and Component Reference=vcl3.hlp
:Index Object Pascal Reference =obpascl3.hlp
:Index MyLibrary=MyLibrary.hlp
(The last line shows how to add the index of the help file MyLibrary.hlp into Delphi's main help index)

If you generate/build a contents file for your help file as well, you can add a the following to the end of Delphi3.cnt:
:Include MyLibrary.cnt

Registry entries
WinHelp needs to find your help file. If you don't want to keep it in Delphi's help directory, you should add path info similar to the following to your (and your users) registry in the HKEY_LOCALMACHINE\Software\Microsoft\Windows\Help key:
Value Name: MyLibrary.hlp
Value data: C:\Dev\Delphi\MyLibrary\Help
(And a similar entry for the .cnt if any)


  • It seems that to include your contents file in Delphi's contents file (a nice feature), your contents file *must* start with a topicbook, not a single topic.
  • If you don't want your K-Keywords to be added to Delphi's index, you can add a
    :Link MyLibrary.hlp
    statement just before you would put a :Include MyLibrary.cnt statement, and not include an ":Index" statement.
    (We have not tested whether it actually needs to be located here.)
  • In Delphi3 it sometimes is necessary to press the 'F1' key twice to really find the topic
    (We have no idea why).

Integrating with Delphi 2 (and 1)
The 16-bit WinHelp system doesn't have the feature which Borland currently uses for integrating help files with Delphi 3. They invented a special scheme to do this for Delphi 1, which they also used for Delphi 2. This includes the concept of a keyword file (.kwf), and a corresponding utility (kwgen.exe) to build keyword files from help projects. The kwgen utility works by scanning the rtf files in a help project, extracting K and B (for Borland) keywords. The resulting kwf files are included into Delphi 2 (and 1)'s help index file (Delphi.hdx) by a special HelpInst.exe utility.

A big drawback with the kwgen utility is that is doesn't understand long filenames, which the files generated by Time2HELP typically use.
In order to overcome this limitation, and to make the process more user friendly, we buildt the same functionality as kwgen.exe offers directly into Time2HELP. You control this feature by using the "Build keyword file" checkbox. If you don't need kwf files, please uncheck this checkbox, as it takes some time to build the .kwf file.


  • There is unfortunately a size limitation to the HDX file. To overcome this, you may have to kick out some existing KWF files from your HDX file in order to include your own.
  • On simple tests, we have discovered small inconsistencies with regard to the .kwf files generated by Time2HELP and the ones generated by Borland's kwgen.exe. However, the differences we have seen were minor, and it seemed to us that the keyword files generated by Time2HELP were actually the "correct" ones.

Note about Delphi 1
We have not tested Time2HELP with regard to building 16-bit help files. It should be possible to build 16-bit help files by customizing the template file (remove WinHelp 4.0 specific features), copy the .rtf files to a separate location and rename them to shorter name (and to the same to a copy of the .hpj file) and then compiling the .hpj file "manually" with a Win3.x help compiler.

If anyone have actually tried to do this (with or without success), please feel free to contact us.

This page was last updated 2005-08-21 .
Copyright © 1997-2005 by Digital Logikk AS.