It is found that many customers are in need of a .NET solution for EAN-8 barcode recognition in VB.NET and C#.NET programming. If you are one of them, have a try with pqScan .NET Control for Barcode Scanning. This professional .NET barcode scanner control supports fast and effective EAN-8 linear barcodes reading and decoding.
We know it is necessary to guide C# and VB.NET users to well test and use our barcode reader library dll. Then this online tutorial is written. Users are always suggested to have a basic understanding of EAN-8 bar code before developing Visual Studio .NET barcode recognition project. If necessary, you may directly see EAN-8 description from Wiki.
How to with Free Demo Code
In all, there are six APIs are simple to be implemented in C# and VB.NET EAN-8 decoding applications, which enables programmers to not only recognize all barcode types from loaded image file but also choose to read EAN-8 barcode symbology only. Please see detailed APIs and sample coding in the following parts.
C# Demo: Tell Scanner to Scan EAN-8 Only
This Visual C# programming demo is used to direct our barcode decoder library to only read all EAN-8 barcodes from loaded image source. You may also see another two APIs for recognizing EAN-8 from images in Bitmap and Stream values.
public void ScanEAN8FromFile(string filename)
// Detect and read EAN-8 only in C#.NET program.
BarcodeResult results = BarCodeScanner.Scan(filename, BarCodeType.EAN8);
// Used to detect and read EAN-8 from image source in Bitmap or Stream value.
// 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.NET Demo: Tell Scanner to Decode All Barcode Types
The following .NET APIs and VB.NET class code are designed for reading all barcode types including EAN-8 linear barcode from image file in Visual Basic .NET application.
Public Sub ScanAllFromFile(ByVal filename As String)
' Detect and scan all barcode types from a local image file.
Dim results() As BarcodeResult = BarCodeScanner.Scan(filename)
' Used to detect and scan all barcode types from a loaded image in Bitmap or Stream value.
' 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)
Besides EAN-8 linear bar code, our Barcode Reader Component for .NET also supports other bar codes recognition in Visual Studio C# and VB.NET programs, like EAN-13, Codabar, Code 39, Code 128, UPC-A, UPC-E, ITF-14, QR Code, etc. If you have requests or questions, please contact us via email (firstname.lastname@example.org).