Module1.vb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | Imports System.IO Imports Bytescout.BarCodeReader Module Module1 Sub Main() Const imageFile As String = "EAN13.png" 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.EAN13 = 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 |
also available as: