QR Code Image Sample - pqScan.com
.NET Barcode Reader SDK Building up Perfect Quality Barcode Reading Software for .NET Online Demo Download Trial Purchase Now

C# & VB.NET: Code 39 Scanning

back to home  >  .NET Barcode Reader SDK  >  Recognize Barcodes in .NET  >  Code 39 Barcode Scanning Using C# and VB.NET

From Barcode Scanner Component for .NET page, you will know that this mature component supports more than 10 bar code symbols, like linear barcodes Code 39, Code 128, UPC/EAN and two-dimensional barcodes QR Code, PDF-417. To help C# and VB.NET users better use our software, we depicts C# online tutorial and VB.NET online tutorial for barcode scanning. And here, we focus on Code 39 1D barcode scanning in Visual C# and VB.NET programming.

On this tutorial, you will get free C# and VB.NET class codes for Code 39 decoding and recognizing in .NET application. If you are using the free trial package of our .NET component for barcode reading, the first character of Code 39 barcode will be randomly decoded. And the last character might be the check digit of Code 39 if it has one. Note: as for Code 39 linear barcode, a Modulo 43 checksum digit is optional for additional security.

Free C# and VB.NET Class Codes

This section includes two parts. One is C# class code for Code 39 reading from image and the other is VB.NET class code for Code 39 reading from image. And we take local image file as image source in the two examples. Certainly, you are able to load an image source in bitmap or stream form. Furthermore, the way of bar code recognition in C# & VB.NET is user-defined, including scanning a target barcode symbol and scanning all barcode types from loaded image file. Please note, reading the color barcode is also supported.

C# Class Code: Read Code 39 1D Barcode

In this Visual C# class coding example, we tell how to detect and read Code 39 linear barcode from a local image file. And Code 39 is set as the target barcode type. More APIs can also be found in this demo code.

public void ScanCode39FromFile(string filename)
  // Code 39 detecting and reading from a local image file in C#.NET class.
  BarcodeResult[] results = BarCodeScanner.Scan(filename, BarCodeType.Code39);

  // Code 39 detecting and reading from a Bitmap or Stream of image in C#.NET class.
  // 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 Class Code: Read Code 39 1D Barcode

Similarly, this Visual Basic class coding example tells how to detect and recognize all barcode types from an image file on your local disk. Besides Code 39, other barcode symbols on the image will be decoded and output. VB.NET APIs for barcodes decoding from bitmap and stream of image are also provided in this demo code.

Public Sub ScanAllFromFile(ByVal filename As String)
  ' Detect and recognize all barcode types from a local image file in VB.NET class.
  Dim results() As BarcodeResult = BarCodeScanner.Scan(filename)

  ' Detect and decode all barcode types from Bitmap or Stream of image in VB.NET class.
  ' 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)
End Sub
pqScan SDK
.NET Barcode Scanner DLL
Online Guide
How to Scan Barcode for .NET How to Scan Barcode Using C# How to Scan Barcode Using VB
Barcode Type
C#/VB QR Code Scanning Demo C#/VB PDF-417 Scanning Demo C#/VB Data Matrix Scanning Demo C#/VB Aztec Code Scanning Demo C#/VB Code 128 Scanning Demo C#/VB EAN-13 Scanning Demo C#/VB EAN-8 Scanning Demo C#/VB UPC-A Scanning Demo C#/VB UPC-E Scanning Demo C#/VB Code 93 Scanning Demo C#/VB Codabar Scanning Demo C#/VB ITF-14 Scanning Demo View All Barcodes >>
I like this barcode reader. I have always wanted to find a solution to read rotated Code 39 from image file. Till now, only this SDK works well. Now, I decide to make an order for it. Lee Finkelman