ByteScout Barcode Reader SDK - VB.NET - General Example - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Reader SDK – VB.NET – General Example

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VB.NET – General Example

ByteScout Barcode Reader SDK – VB.NET – General Example

Module1.vb

Imports System.IO

Imports Bytescout.BarCodeReader

Module Module1

    Sub Main()

        Const imageFile As String = "Barcode.jpg"

        Console.WriteLine("Reading barcode(s) from image {0}", Path.GetFullPath(imageFile))

        Dim reader As New Reader()
        reader.RegistrationName = "demo"
		reader.RegistrationKey = "demo"

        ' Set barcode type to find
        reader.BarcodeTypesToFind.All = True
        ' We recommend to use specific barcode types to avoid false positives, e.g.:
        ' reader.BarcodeTypesToFind.QRCode = True
        ' reader.BarcodeTypesToFind.Code39 = True;

        ' Read barcodes
        Dim barcodes As FoundBarcode() = reader.ReadFrom(imageFile)

        For Each barcode As FoundBarcode In barcodes
            Console.WriteLine("Found barcode with type '{0}' and value '{1}'", barcode.Type, barcode.Value)
        Next

        Console.WriteLine("Press any key to exit..")
        Console.ReadKey()

    End Sub

End Module


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next