Delphi 4-7
Barcodes in Delphi projects

Delphi 4-7

How to use barcodes in Delphi
Version 4.x, 7.x


You can use ActiveBarcode in Delphi like any other control (e.g. like a button). First you have to add the ActiveBarcode control into the Delphi development environment. Go to the menu "Component" and select the function "Import ActiveX control":

Barcode, Delphi 4-7


A dialog shows up on your screen. Select "ActiveBarcode" from that list of controls. Then click the "Install..." button:

Barcode, Delphi 4-7


Follow the instructions showing on your screen.

Now the ActiveBarcode control is added to your Delphi development environment. The barcode icons of ActiveBarcode will appear in the tool bar located in "ActiveX":

Barcode, Delphi 4-7


Now select this icon and place it anywhere in a form. The barcode control will be placed in that form. This will be a standard barcode. You can change this and all other properties of that barcode control in the "Object Inspector".

Barcode, Delphi 4-7


For example you can select any barcode that is supported by ActiveBarcode: QR Code, GS1/EAN-128, Data Matrix, GTIN/EAN-13, Code 39, Code 93, GS1-Data Matrix, Code 128, PDF417, DUN-14, EAN-8, EAN-14, EAN-18, ISBN, ITF-14, NVE, PZN8, SCC-14, SSCC-18, ...

To set the properties is very simple. Some examples:

Barcode1.Text := '123456789012';
Barcode1.BackColor := clWhite;
Barcode1.ForeColor := clBlack;
Using the Picture Property:
How to copy the barcode image into a image object:
Image1.Picture.Bitmap.Height := Barcode1.Height;
Image1.Picture.Bitmap.Width := Barcode1.Width;
How to copy a barcode into the Windows clipboard. First as meta file (WMF):
And now as bitmap image:
Image1.Picture.Bitmap.Height := Barcode1.Height;
Image1.Picture.Bitmap.Width := Barcode1.Width;
Barcode1.Picture.PictureAdapter := nil; // delphi workaround