Delphi - Barcodes in projects

EnterpriseTo use this functionality you require the Enterprise Edition

Info This example is for Delphi Version 4-7
There is also a description available for Delphi 2005 or better.

How to use barcodes in Delphi (Version 4.x to 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":

Screenshot

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

Screenshot

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":

Screenshot

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".

Screenshot

For example you can select any barcode that is supported by ActiveBarcode: Codabar, Code 25 Industrial, Code 25 Interleaved, Code 39, Code 39 Extended, Code 93, Code 93 Extended, Code 128, Data Matrix, DUN-14, EAN-2, EAN-5, EAN-8, EAN-13, EAN-14, EAN-18, EAN-99, EAN 128, EAN-Velocity, GS1-128, GTIN, Identcode, ISBN-10, ISBN-13, ISBN-13 Dual, Bookland, ISSN, ISMN, ITF-14, JAN, Leitcode, MSI, NVE, PDF417, PostNet, PZN, Royal Mail SCC-14, SSCC-18, UCC-128, UPC-A and UPC-E

Programmierung:
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;
Barcode1.Picture.PictureAdapter := nil; // delphi workaround
Image1.Picture.Bitmap.Canvas.Draw(0,0,Barcode1.Picture.graphic);
Clipboard:
How to copy a barcode into the Windows clipboard. First as meta file (WMF):
  Barcode1.CopyToClipboard;
And now as bitmap image:
Image1.Picture.Bitmap.Height := Barcode1.Height;
Image1.Picture.Bitmap.Width := Barcode1.Width;
Barcode1.Picture.PictureAdapter := nil; // delphi workaround
Image1.Picture.Bitmap.Canvas.Draw(0,0,Barcode1.Picture.graphic);
Clipboard.Assign(Image1.Picture.Bitmap);



Read more descriptions of how to add barcodes to standard applications (e.g. Office, Excel, Word, Access forms, Access reports, PowerPoint, OpenOffice.org, Lotus Notes, Publisher, Freelance, Freehand MX, Image Editors, WordPad, etc.)

rss twitter Bookmark and Share
| Home | Shop | Email | Datenschutz | Sitemap | Print preview | Version 5.58 | © Lars Schenk & Frank Horn

All trademarks and product names mentioned are the property of their respective owners.