How To Create Help File For Delphi Application in DR
How To Create Help File For Delphi Application in DR
Delphi Application in
Dr.Explain
Installation of Dr.Explain
Download the distribution package of the Dr.Explain from the Download section of the official
product website athttp://www.drexplain.com/ and pass the standard procedure of installing the
software to start using it.
Use of unregistered version of the software without time limits is available for free. Functional
features for free and licensed versions of Dr.Explain match, but all images in the final free version of
help file will be marked with a watermark.
Picture 1. Dr.Explain Installation Wizard
Go to menu Settings -> Project Settings and in the dialog box, go to CHM export -> Manage
Help ID. For follow binding Delphi project to topics of help file, flag Export Help ID in CHM.
Press OK to apply the settings to the project.
Picture 3. Project settings window
After applying the settings for each topic and each new topic created in the future a unique numeric
identifier Help ID will be automatically assigned.
In the project tree, specify the name of the created topics and determine their order using the
appropriate menu sections.
Navigate to the desired topic in the project tree and in the editor window type the contents of the
section in free form. The editor provides a standard functionality for text formatting.
In the tab Keywords select a set of keywords to search for the help file. To associate a keyword to
a specific topic, select the topic in the project tree and flag the selected keyword.
Picture 5. Keywords
As a result of selecting an object in the section editor a topic containing screenshots of both the
object and its dependent objects of the application will be automatically created. Editor interface
allows deleting information about a section objects and rearrange them without leaving the editor by
pressing one button.
Picture 7. Result of screen capture
Go to menu Tools > Check Project for Errors to check the uniqueness of the amended Help
ID. In the case of matching of this value in several topics a message about duplicate values appears.
To properly create and link Help file CHM to the project Delphi, eliminate duplication by changing
one or more values of Help ID, without departing from the Validation tool by clicking a cell in
the Value field.
Picture 9. Project validation tool window. Help ID duplicate values
Go to menu of Delphi Environment Project -> Options and in tab Application, specify the
path in the field Help file.
Note: If you specify a full path to a file, the Delphi application, running on any machine will search
the help file in the specified directory that may not exist on the machine that is running. Therefore,
the optimal solution is a relative path to the Help file.
Go to menu of Delphi Environment Project -> View Source in the window opened enter the
code:
Application.HelpFile:=ExtractFilePath(Application.ExeName) + 'Helpdrexplain.chm,
'Helpdrexplain.chm - CHM.
HelpFile:=ExtractFilePath(Application.ExeName) + 'Helpdrexplain.chm'
Picture 13. Setting of a relative path to the CHM Help file for TForm
In the Object Inspector, specify the appropriate value for the form in the field HelpFile
Picture 14. Setting of a relative path to the CHM Help file for the object TForm in the Object
Inspector
Download and place in a directory of your project file *.pas of one of selected extensions:
HtmlHelpViewerEx (http://dl.dropbox.com/u/201788/Projects/HTMLHelpViewerEx.zip);
HtmlHelpViewer (https://github.com/darrincedwards/SESComponentsNW/blob/master/HTMLHelp
Viewer.pas);
StoHtmlHelp (http://pyscripter.googlecode.com/svn/tags/Release_1.7/StoHtmlHelp.pas);
Specify the name of the linked extension in any Uses section in Delphi project.
Further work with a help file in applications in Delphi version 7 or previous is performed in ways
described above similar to other versions of Delphi.