.NET Barcode Scanner SDK

Read & Scan Barcode in VB.NET
CnetSDK .NET Barcode Scanner SDK is fully built in C#.NET. It can be used to add highly accurate and mature barcode scanning & reading features into a .NET project.

And this online VB.NET tutorial is written to help VB.NET developers to efficiently integrate and use CnetSDK .NET barcode reader library dll. Mature .NET APIs and free VB.NET code demos for linear & 2D barcodes reading & recognition are provided.
INTEGRATE .NET BARCODE SCANNER DLL
It is quite simple to integrate .NET barcode reader library dll into your VB.NET project. Just add your VB.NET project reference to CnetSDK.Barcode.Scanner.Trial.dll.

CnetSDK.Barcode.Scanner.Trial.dll is under the folder Library in the download free trial package. For free trial package, you can use all bar code scanning and reading features in your VB.NET project. But note that, the first data value of each barcode will be a recognized as a question mark (?).

CnetSDK .NET barcode reader library trial package can only be used for testing purpose. To get all encoded value recognized, please buy a license for CnetSDK .NET Barcode Scanner SDK.
.NET APIS FOR BARCODE SCANNING & READING
CnetSDK .NET Barcode Scanner & Decoder allows VB.NET developers to load an image from String, Stream, and Bitmap by using nine mature .NET APIs. And no matter how many barcodes on your image source, our .NET barcode scanner & decoder can read and decode them all. Certainly, you can use .NET APIs to tell barcode scanner library to read only the one barcode type from an image source. If there's only one barcode on your image, you can improve barcode reading accuracy using the third group of .NET APIs. Please see all mature .NET APIs as below. For your VB.NET barcode scanning project, choose the suitable one.
' API for all barcodes reading & decoding from Bitmap object.
public static ScanResult() ScanBarcode(Bitmap Bitmap)

' API for all barcodes reading & decoding from Stream object.
public static ScanResult() ScanBarcode(Stream Stream)

' API for all barcodes reading & decoding from an image file on the disk.
public static ScanResult() ScanBarcode(String FileName)
' API for one barcode type recognition from Bitmap.​
​public static ScanResult() ScanBarcode(Bitmap Bitmap, CSBarcodeType Type)

' API for one barcode type recognition from Stream.
public static ScanResult() ScanBarcode(Stream Stream, CSBarcodeType Type)

' API for one barcode type recognition from a local image file.
public static ScanResult() ScanBarcode(String FileName, CSBarcodeType Type)
' API for the only barcode scanning from Bitmap. It improves barcode decoding accuracy.
public static ScanResult() ScanOnlyBarcode(Bitmap Bitmap)

' API for the only barcode scanning from Stream. It improves barcode decoding accuracy.
public static ScanResult() ScanOnlyBarcode(Stream Stream)

' API for the only barcode scanning from local image file. It improves barcode decoding accuracy.
public static ScanResult() ScanOnlyBarcode(String FileName)
.NET BARCODE SCANNER VB.NET CODE EXAMPLE
For your reference, CnetSDK.com offers VB.NET demo code for how to read and recognize all barcodes from an image source, VB.NET demo code for how to read and recognize one barcode type from an image source, and VB.NET demo code for the only barcode decoding. As for the second example, a certain barcode type recognition using VB.NET programming language, we take 2d barcode QR Code as an example. And for the last one, it can improve the accuracy of barcode decoding.
VB Code Demo - Scan & Decode All Barcodes from Bitmap Object


Public Sub ScanAllBarcodeTypes(Bmp As Bitmap)
   Dim BarcodeRecognition As ScanResult() = CSBarcodeScanner.ScanBarcode(Bmp)
   For Each output As ScanResult In BarcodeRecognition
      Console.WriteLine((output.BarcodeType.ToString() & "-") + output.BarcodeData)
   Next
      Console.ReadKey()
End Sub
VB Code Demo - Define A Barcode Type to Read (Sample is QR Code)


Public Sub ScanASpecifiedBarcodeType(Bmp As Bitmap)
   Dim BarcodeRecognition As ScanResult() = CSBarcodeScanner.ScanBarcode(Bmp, CSBarcodeType.QRCode)
   For Each output As ScanResult In BarcodeRecognition
      Console.WriteLine((output.BarcodeType.ToString() & "-") + output.BarcodeData)
   Next
      Console.ReadKey()
End Sub
VB Code Demo - Scan and Recognize the Only Barcode from Image


Public Sub ScantheOnlyBarcodefromImage(ByVal Bmp As Bitmap)
   Dim Bmp As Bitmap = New Bitmap("CnetSDKTest.jpg")
   Dim DecodeBarcode As BarcodeRecognition = CSBarcodeScanner.ScanOnlyBarcode(Bmp)
   Console.WriteLine("barcode data:{0}.", DecodeBarcode.BarcodeData)
   Console.ReadKey()
End Sub
We also provide C# demo code for linear and 2d barcodes recognition. Please see online C# tutorial here: Visual C# Sample Code for 1D & 2D Barcodes Reading & Decoding.
ALL 1D & 2D BARCODES

Read QR Code in VB

Read Data Matrix in VB

Read PDF-417 in VB

Read Aztec in VB

Read EAN-13 in VB

Read EAN-8 in VB

Read UPC-A in VB

Read UPC-E in VB

Read Code 128 in VB

Read Code 39 in VB

Read Code 93 in VB

Read Codabar in VB

Read ITF-14 in VB