TLCD99 ReadMe
By Jonathan Hosking
V1.8 (15/10/2000)

Table of contents

What is the TLCD99 component?
How to install the TLCD99 component
TLCD99 reference
Revision history
Future ideas
Other components
Contacting me

What is the TLCD99 component?

The TLCD99 component is a new component I have written for Delphi and C++Builder. It simply looks like an LCD display, but there is more to it than you think. It can be fully customised if desired. It has the following features: -

The component code was written by modifying some code for my TYearPlanner component. The code works fine on Delphi 1.0, 2.0, 4.0, 5.0 and C++Builder 3.0 & 4.0, but I have not tested it with other versions.

You are free to distribute the code, but you may NOT sell it. If you modify the code, you must include me in the acknowledgements. If you do want your ideas or modifications to be incorporated into the latest version, send them to the address at the end of this document.

Thanks to Jean Pierre and Daniel Szasz for their help with the drawing routines and colon support routines.

Thanks to Alan Warriner for implementing double buffering, the animation preview feature, and improving the animation delays.

Thanks to Mike Heydon for implementing the numeric value routines and OnChange event.

How to install the TLCD99 component

To unzip the TLCD99 component, assuming [Program Path] is the path to Delphi or C++Builder, follow these steps: -

  1. Unzip the file LCD99.ZIP to any directory, using the directory switch (This is VERY important).
  2. Copy the file LCD99.PAS to the directory [Program Path]\Source\Samples.
  3. If you want documentation, copy the file LCD99.HTM to the directory [Program Path]\Bin, if you are using Delphi 1.0. Otherwise, copy it to the directory [Program Path]\Help.
  4. If you are using Delphi 1.0, copy the files in the 16-Bit directory of this Zip to the directory [Program Path]\Source\Samples. Otherwise, copy the files in the 32-Bit directory of this Zip to the directory [Program Path]\Source\Samples.

You can now install the component into the component library. Follow the procedure for the version of Delphi or C++Builder that you are using.

Delphi 1.0:

  1. Click on Options and then select Install Components.
  2. In the Install Components dialog, click Add. In the next dialog, click Browse and open the file LCD99.PAS.
  3. Click Ok to install the component.

Delphi 2.0:

This procedure should also work with C++Builder 1.0, but I'm not sure.

  1. Click on Component and select Install.
  2. In the Install Components dialog, click Add. In the next dialog, click Browse and open the file LCD99.PAS.
  3. Click Ok to install the component.

Delphi 4.0:

  1. Click on Tools and select Environment Options.
  2. In the next dialog, click on the Library tab and add the full path of the TLCD99 source code to the Library Path edit box. Then click Ok.
  3. Click on Component and select Install Component.
  4. In the Install Component dialog, click on the Into existing package tab. Click on the first Browse button and open the file LCD99.PAS. Then click on the second Browse button and open the file DCLUSR40.DPK. Finally, click Ok to install the component.

Delphi 5.0:

  1. Click on Tools and select Environment Options.
  2. In the next dialog, click on the Library tab and add the full path of the TLCD99 source code to the Library Path edit box. Then click Ok.
  3. Click on Component and select Install Component.
  4. In the Install Component dialog, click on the Into existing package tab. Click on the first Browse button and open the file LCD99.PAS. Then click on the second Browse button and open the file DCLUSR50.DPK. Finally, click Ok to install the component.

C++Builder 3.0:

This procedure should also work, with minor modifications, with Delphi 3.0, but I'm not sure.

  1. Click on Tools and select Environment Options.
  2. In the next dialog, click on the Library tab and add the full path of the TLCD99 source code to the Library Path edit box. Then click Ok.
  3. Click on Component and select Install Component.
  4. In the Install Component dialog, click on the Into existing package tab. Click on the first Browse button and open the file LCD99.PAS. Then click on the second Browse button and open the file DCLUSR35.BPK. Finally, click Ok to install the component.

C++Builder 4.0:

This procedure should also work, with minor modifications, with C++Builder 5.0, but I'm not sure.

  1. Click on Tools and select Environment Options.
  2. In the next dialog, click on the Library tab and add the full path of the TLCD99 source code to the Library Path edit box. Then click Ok.
  3. Click on Component and select Install Component.
  4. In the Install Component dialog, click on the Into existing package tab. Click on the first Browse button and open the file LCD99.PAS. Then click on the second Browse button and open the file DCLUSR40.BPK. Finally, click Ok to install the component.

TLCD99 reference

Remarks:

If your digits do not display correctly, you may have done one of the following: -

You can edit the digit data by changing the values in the array LCDDisplayData. The array consists of 38 digit sets, each comprising of 8 segments that can be turned on or off. The first 10 sets are the digits 0 to 9, the next 2 sets are the sign digit and colon, and the last set is the letters of the alphabet. A value of 0 turns a segment off, while a value of 1 turns the segment on. A diagram of the segment layout is included in the source code.

You can edit the animation patterns, if you wish, by changing the values in the variable LCDAnimationData. There are sub-arrays for each animation, each containing a list of segment numbers. The animation of drawn in the order of the segment numbers. Below is a list of the animations: -

  1. Spiral animation.
  2. Up animation.
  3. Down animation.
  4. Right animation.
  5. Left animation.

You can add your own animations if you wish, but you will need to make some modifications. I do not support this, however. If you want your animations in future releases, send the new array list to me.

The animation delay is not entirely accurate at the moment. For example, if you specify a delay of 1000 then the control may take slightly over a second to update. If anyone can find a solution to this, please contact me, but it's not a major problem.

You can use the GetNumericValue function to get the numeric value of the Value property. The SetNumericValue procedure will set the Value property to a numeric value. These routines were designed to avoid using lengthy type conversions, like StrToInt and IntToStr, when using the Value property.

Known problems:

There is currently one known problem with the control, but hopefully it will be fixed in future versions. It is listed below: -

Key properties:

Key events:

Revision history

V1.8 (15/10/2000)

V1.73 (19/08/2000)

V1.72 (12/08/2000)

V1.71 (29/07/2000)

V1.7 (26/07/2000)

V1.65 (03/06/2000)

V1.64 (01/02/2000)

V1.63 (12/01/2000)

V1.62 (04/09/1999)

V1.61 (17/08/1999)

V1.6 (12/08/1999)

V1.5 (07/08/1999)

V1.4 (13/07/1999)

V1.3 (09/07/1999)

V1.2 (28/06/1999)

V1.1 (26/06/1999)

V1.0 (28/05/1999)

Future ideas

I currently only have one idea for future versions of the TLCD99 component. It is shown below: -

Other components

Below is a list other components that I have written: -

Contacting me

I am currently on the Internet. If you have any bug reports, comments, ideas, modifications, etc. then you can Email me at the address given below. You can also go to my web site to find out the latest information on my components.

Email: jonathan@the-hoskings.freeserve.co.uk
WWW: http://www.the-hoskings.freeserve.co.uk/