pqScan Barcode Reader SDK for .NET is a strong-named component DLL which can be used for C# and VB.NET barcode recognition. It supports commonly used linear and two-dimensional bar code symbols. On this tutorial page, we will give you C# coding example for Code 128 reading, as well as VB.NET coding example for Code 128 font reading. Now, you may directly download free trial package of our Barcode Decoder Component for .NET online to have a quick test.
At the very beginning, one thing you should know. The free .NET Barcode Reader SDK package is used for testing purpose only and the first decoded Code 128 data will be a random character. Except this, there are no other differences between free trial SDK and production SDK.
Code 128 Reading Examples
If you are a Visual C# or VB.NET programmer, this part will help you a lot. After adding reference to our .NET barcode scanner component in Visual Studio project, you can easily use robust APIs to implement fast Code 128 barcode detecting and scanning.
In details, you are able to load image file (Jpeg/Jpg, Tiff/Tif, Png, Bmp or Gif) in the forms of bitmap, local picture at pc and stream to your Visual Studio C# or VB.NET application. If the Code 128 1d bar code on loaded image source is rotated to 180 degree, it still can be recognized by our barcode reader DLL library for .NET. The following two examples illustrate how to use C# and VB.NET class codes to scan and read Code 128 barcode from an image file on your local disk.
C# Example: Detect and Read Code 128 on Image
public void ScanCode128FromFile(string filename)
// Set Code 128 as target barcode type and read from loaded image file.
BarcodeResult results = BarCodeScanner.Scan(filename, BarCodeType.Code128);
// Set Code 128 as target barcode type and read from images in Bitmap and Stream forms.
// public static BarcodeResult Scan(Bitmap bitmap, BarCodeType barType);
// public static BarcodeResult Scan(Stream stream, BarCodeType barType);
foreach (BarcodeResult result in results)
Console.WriteLine(result.BarType.ToString() + "-" + result.Data);
VB Example: Detect and Read All Barcodes on Image
Public Sub ScanAllFromFile(ByVal filename As String)
' Read all barcode symbols from loaded image file.
Dim results() As BarcodeResult = BarCodeScanner.Scan(filename)
' Read all barcode symbols from images in Bitmap and Stream forms.
' public static BarcodeResult Scan(Bitmap bitmap)
' public static BarcodeResult Scan(Stream stream)
Dim result As BarcodeResult
For Each result In results
Console.WriteLine(result.BarType.ToString() + "-" + result.Data)
To see related barcode detecting and reading tutorials, please go to .NET Barcode Reading Tutorial - Overview page. Besides .NET solution for C# & VB.NET Code 128 reading, we also provide .NET solution for C# & VB.NET Code 128 generation. Please click to see details.
.NET Barcode Reader Control
Barcode Recognition in .NET
Barcode Recognition in C#
Barcode Recognition in VB.NET
QR Code Recognition in C#/VB
PDF-417 Recognition in C#/VB
Data Matrix Recognition in C#/VB
Aztec Code Recognition in C#/VB
Code 39 Recognition in C#/VB
EAN-13 Recognition in C#/VB
EAN-8 Recognition in C#/VB
UPC-A Recognition in C#/VB
UPC-E Recognition in C#/VB
Code 93 Recognition in C#/VB
Codabar Recognition in C#/VB
ITF-14 Recognition in C#/VB
View All Barcodes >>
Having not been using pqScan SDK for very long. But so far, it has all supportive functions that I need. I think it is great software that should be recommended. I love it!
SUPPORT SYSTEM: MICROSOFT WINDOWS XP, WINDOWS VISTA, WINDOWS 7, WINDOWS 8, WINDOWS SERVER. SUPPORT PLATFORM: .NET FRAMEWORK, VISUAL BASIC, VISUAL C#, ASP.NET, JAVA, JDK, SWING, APPLET, JSP, SERVLET, J2SE, J2EE. SUPPORT BARCODE TYPE: QR CODE, DATA MATRIX, PDF417, AZTEC CODE, CODE 128, CODE 39, CODE 93, CODABAR, EAN 13, EAN 8, UPCA, UPCE, ITF14. SUPPORT IMAGE FORMAT: JPEG, JPG, PNG, GIF, TIFF, TIF, BITMAP, BMP. SUPPORT VIEWER: MOZILLA FIREFOX, INTERNET EXPLORER, GOOGLE CHROME, OPERA, SAFARI, ADOBE and ACROBAT PDF.
Copyright © pqScan 2010-2017. All Rights Reserved.