Quick to scan UPC-A barcodes in VB.NET WinForms, WPF application
Here we will learn how to scan and recognize UPC-A (12-digit universal product linear barcode) using the VB.NET Barcode Reader library.
You can implement UPC-A barcode scanning with a direct method call in VB.NET. The core scanning method accepts an image source and target barcode type as input parameters.
The VB.NET example codes below explain the steps to scan UPC-A barcodes in VB.NET:
You can implement UPC-A barcode scanning with a direct method call in VB.NET. The core scanning method accepts an image source and target barcode type as input parameters.
The VB.NET example codes below explain the steps to scan UPC-A barcodes in VB.NET:
- Call the core decoding method
BarcodeScanner.Scan(). - Pass the barcode image file path as the first parameter.
- Specify the barcode type as
BarcodeType.UPCA. - The method returns a string array containing all decoded barcode data.
' Scan and decode UPC-A barcode from image file Dim datas As String() = BarcodeScanner.Scan("upc-a-barcode-image.gif", BarcodeType.UPCA)
Common Asked Questions
What is a UPC-A barcode?
UPC-A barcode usually encodes a GTIN-12 code, which is a 12 digits Global Trade Item Number. The 12 digits Global Trade Item Number includes 11 digits of data message,
and one digit of check digit. Using VB.NET Barcode Reader Library, you can quickly enable UPC-A barcode reading and scanning feature in your VB class, library, Windows Forms, WPF and
.NET Console applications.
What is the difference between EAN-13 and UPC-A?
UPC-A Format barcodes have traditionally been used in the North America (USA and Canada), whereas EAN-13 format barcodes have been used throughout the rest of the world.
VB.NET Barcode Reader SDK supports both UPC-A and EAN-13 barcode images scanning and reading in Visual Basic class.
What is the difference between UPC-A and UPC-E?
UPC-A is a 12-digit barcode, and UPC-E is a compressed UPC-A with 6 digits code.
Using VB.NET Barcode Scanner library, you can enable UPC-A and UPC-E reading and recognition functions with few lines of vb codes in WPF, Windows Forms applications.
How to check if an UPC code is correct?
When a barcode device or barcode scanner software scan and read the a UPC barcode data, it will use the last checksum digit to verify the UPC-A data.
OnBarcode VB.NET Barcode Reader library will automatically apply UPC-A checksum calculation rules to verify the scanned UPC-A data and the last checksum digit.