Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++DelphiTech Partner

Scanning Optical Barcodes in your Delphi and C++ Builder VCL Applications


Optical Barcode Recognition (OBR) or Optical Character Recognition (OCR) technology has been utilized in many commercial applications. The fonts are electronically scanned and digitized into ASCI characters. Hand-held scanners also allow the user to have the ability to examine data, for instance, locating and reading the International Standard Book Number (ISBN) found on most published books, which is usually printed on the back cover. 

So, in this tutorial, you will learn how to scan the optical barcode with your Delphi/C++ Builder VCL applications. 

OBR Library by WINSOFT can scan optical barcodes for you quickly and fast. It uses ZXing.Net and supports a wide variety of visual barcode types. For example, UPC-A, UPC-E, EAN-8, EAN-13, Code 39, Code 93, Code 128, Codabar, ITF, RSS-14, RSS-Expanded, QR Code, Data Matrix, Aztec, PDF 417 and Pharmacode barcodes.

This is a commercial library that has a trial version with all features for evaluation only, and if you wish to distribute this library as a part of your project, you should get a license.


  • Supports Windows 32-bit & Windows 64-bit
  • Available for Delphi & C++ Builder 6-10.4  VCL


When you have the library for your development, everything gets easy. There are tens of thousands of applications that utilize Visual Component Library as a primary weapon. Moreover, the VCL community is massive, and there are enough libraries to do any kind of job. 

For instance, in this case, suppose you want to develop an application that can scan any type of optical barcodes. You can rely on the OBR Library here.

We have a demo that shows how we can implement such an application. After configuring your development environment you need to declare required units to work with the OBR library. 

Here is our user interface. There is one button which triggered to open the open dialog box to select a barcode image. After loading the picture, it starts to get the result.

User Interface

So we have only one event and here is the implementation:

The TDecodeResults record has Text, Format, FormatName, and Points fields. TBarcodeDecoder is the main class here, which controls all the process for you.

First, it decodes the loaded image. If there is no barcode, it displays the “No barcode found” message. Or it starts to iterate over parsed barcodes from the Barcodes variable and prints all the available results in the TMemo component.

Here’s a quick video of the component and its code in action:

As you can see with this OBR Library by WINSOFT, it is swift and straightforward.

Like what you see? You can get Optical Barcode Recognition and over 100 other fantastic WinSoft components with our Enterprise Component Pack. For a limited time, when you purchase RAD Studio Enterprise or Architect Edition at special Upgrade Pricing, you will also get this package of third-party software worth over $13,000, including the full WinSoft Component Library, at NO EXTRA COST! Step up to RAD Studio 10.4 today!

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Software Developer | CS(CyberSec) Undergrad at APU Malaysia | Delphi/C++ Builder Enthusiast | Microsoft Learn Student Ambassador | Microsoft Azure Certified

1 Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.