» Contents
This non-visual component encapsulates an About Box.
The component has string properties to display five different pieces of information in the about box. These properties are:
Alternatively, the about box can display information from a VERSIONINFO resource included in the program. This is accessed using a linked TPJVersionInfo component (see below) by using the about box's VersionInfo property. The values of the ProgramName, Version, Copyright and Notes properties are ignored and relevant string information program's version information is used in their stead.
The About box also displays an icon. This is the icon defined for the application (see the Icon property of TApplication). If no icon has been specified for the application the default Delphi icon is used.
The dialog's location when displayed can be explicitly set using the DlgLeft and DlgTop properties. If CentreDlg is set to True when the about box is centred. These properties act relative to the screen, the desktop work area or the owning control, depending on the value of thePosition property.
The appearance and location of the dialog's close button can be customised. Its appearance is governed by the ButtonGlyph, ButtonKind and AutoDetectGlyphs properties while the button's position and size are determined by the ButtonPlacing, ButtonWidth and ButtonHeight properties.
The HelpContext property allows Windows Help to be displayed for the dialog box when F1 is pressed.
A help file is included that integrates into the OpenHelp system of Delphi 3 to 7. The help file can be used independently of the IDE with Delphi 2 and Delphi 2005 onwards. This also applies to Delphi provided it is run on a 32 bit Windows platform.
TPJAboutBoxDlg requires that a DelphiDabbler Version Information Component (TPJVersionInfo) is installed in order to compile. The version of TPJVersionInfo required depends on whether the about box is being compiled under Delphi 1 or under Delphi 2 and later. The required versions are:
» Contents
The unit name changed to PJAbout
as at release 3. Programs
using earlier releases will need to be modified (or to have an alias set in
Delphi's Project Options) before being recompiled using the new version.
» Contents
TPJAboutBoxDlg, its help files and demo program are supplied in a zip file. Before installing you need to extract all the files from the zip file, preserving the directory structure. The following files will be extracted:
PJAbout.pas
– component source code.
PJAbout.dfm
– form file containing
about box.
PJAbout.hlp
– component help file that integrates
with the Delphi 3 to 7 OpenHelp system.
PJAbout.als
– a-link keyword file for integration
with the Delphi 6 or 7 OpenHelp system.
ReadMe.htm
– this file.
ChangeLog.txt
– component's change log.
16\PJAbout.dcr
– resource file
containing a 16 bit component palette glyph for use with Delphi 1.
32\PJAbout.dcr
– resource file
containing a 32 bit component palette glyph for use with Delphi 2 and
later.
Demo\AboutBoxDemo.dpr
– demo program project file.
Demo\AboutBoxDemo.res
– demo program's icon resource.
Demo\AboutBoxDemo.cfg
– compiler config file for demo
program.
Demo\FmDemo.pas
– demo program main form source code.
Demo\FmDemo.dfm
– demo program main form.
Demo\VerInfo.rc
– source for demo program's version
information resource.
Demo\VerInfo.res
– demo program's version information
resource.
You can now proceed to install the component using the
emphasised files above. Installation methods vary between
Delphi versions, so follow the instructions that apply to your version
below. Note that $(DELPHI)
represents the
path where the appropriate version of Delphi was installed. Similarly
$(BDS)
refers to the installation path of a
version of the Borland Development System.
The component must be installed into a Delphi Win32 design package. It is
assumed that you will be installing into an existing package. You may decide
to install into the "user" package:
$(BDS)\Lib\dclusr.dpk
.
Borland Studio Projects
or $(BDS)\lib
folders.
PJAbout.pas
, PJAbout.dfm
and
32\PJAbout.dcr
to the chosen installation folder.
.bpl
extension. Right click the package's entry and
select Add to display the Add dialog box.
Enter the full path to PJAbout.pas
in the Unit
file name edit box (use the Browse button to
navigate to the file). Click OK to add the component to
the package.
PJAbout.pas
, PJAbout.dfm
and
PJAbout.dcr
appear under the package's
Contains node. If so, right click the package's entry
again and select Compile. If the resulting
compilation succeeds a message should be displayed confirming
that TPJAboutBoxDlg
has been registered. The component should now appear in the
"DelphiDabbler" section of the Tool Palette. (Note
this will only appear when a form is selected in the designer).
PJAbout.pas
from the chosen
installation folder.
The component must be installed into a design package. It is assumed that
you will be installing into an existing package. You may wish to use the
"user" package named dclusr.dpk
or
dclusrXX.dpk
(where XX
is a version number). This
package can be found in $(DELPHI)\Lib
.
$(DELPHI)\lib
folder.
PJAbout.pas
, PJAbout.dfm
and
32\PJAbout.dcr
to the chosen installation folder.
PJAbout.pas
in the Unit file name
edit box (use the adjacent Browse button to navigate to
the file). Choose the required package from the Package
description combo box, or by navigating to the package
using Browse. Click OK to confirm your
selections.
PJAbout.pas
from the chosen
installation folder.
.als
file. The simplest way to install help is to use my
Component Help
Installer Expert (v2.2.1 or later). If you prefer to install
manually,
this
article explains the process.
$(DELPHI)\lib
folder.
PJAbout.pas
, PJAbout.dfm
and
32\PJAbout.dcr
to the chosen installation folder.
PJAbout.pas
from the resulting standard file open
dialog box and click Open.
PJAbout.pas
from the chosen
installation folder.
$(DELPHI)\lib
folder.
PJAbout.pas
, PJAbout.dfm
and
16\PJAbout.dcr
to the chosen installation folder.
PJAbout.pas
from the resulting standard file open
dialog box and click OK.
PJAbout.pas
from the chosen
installation folder.
» Contents
A demo program is included in the download that can be used to exercise the component. This program can be compiled with any 32 bit version of Delphi, but does not work with Delphi 1.
» Contents
A complete change log is provided in a text file that is included in the download.
» Contents
This source code is subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is PJAbout (About Box Component).
The Initial Developer of the Original Code is Peter Johnson (http://www.delphidabbler.com/).
Portions created by the Initial Developer are Copyright © 1999-2005 Peter Johnson. All Rights Reserved.
All relevant trademarks are acknowledged.
» Contents
I'm Peter Johnson – a hobbyist programmer living in Ceredigion in West Wales, UK, writing write mainly in Delphi. My programs are available for download from: http://www.delphidabbler.com/.