ByteScout Barcode Reader SDK - VB.NET - WPF UI Barcode Reading Example - ByteScout

ByteScout Barcode Reader SDK – VB.NET – WPF UI Barcode Reading Example

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VB.NET – WPF UI Barcode Reading Example

WPF UI barcode reading example in VB.NET and ByteScout BarCode Reader SDK

Make WPF UI barcode reading example in VB.NET

:

Tutorial on how to do WPF UI barcode reading example in VB.NET

Source code documentation samples provide quick and easy way to add a required functionality into your application. ByteScout BarCode Reader SDK helps with WPF UI barcode reading example in VB.NET. ByteScout BarCode Reader SDK is the SDK for reading of barcodes from PDF, images and live camera or video. Almost every common type like Code 39, Code 128, GS1, UPC, QR Code, Datamatrix, PDF417 and many others are supported. Supports noisy and defective images and docs. Includes optional documents splitter and merger for pdf and tiff based on found barcodess. Batch mode is supported for superior performance using multiple threads. Decoded values are easily exported to JSON, CSV, XML and to custom format.

VB.NET, code samples for VB.NET, developers help to speed up the application development and writing a code when using ByteScout BarCode Reader SDK. Follow the instruction from the scratch to work and copy and paste code for VB.NET into your editor. VB.NET application implementation typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Free trial version of ByteScout BarCode Reader SDK is available on our website. Get it to try other samples for VB.NET.

Try ByteScout BarCode Reader SDK today: Get 60 Day Free Trial or sign up for Web API

Application.xaml.vb
      
Class Application ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException ' can be handled in this file. End Class

Try ByteScout BarCode Reader SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

MainWindow.xaml.vb
      
Imports System.Text Imports Bytescout.BarCodeReader Class MainWindow ' Select image file Private Sub btnBrowse_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles btnBrowse.Click Dim dlg = New Microsoft.Win32.OpenFileDialog dlg.Filter = "Supported formats (*.bmp;*.gif;*.tif;*.png;*.jpg;*.pdf)|*.bmp;*.gif;*.tif;*.tiff;*.png;*.jpg;*.jpeg;*.pdf|All Files|*.*" If dlg.ShowDialog() = True Then tbFileName.Text = dlg.FileName tbFoundBarcodes.Text = "" imageContainer.Source = Nothing Try Dim bitmapImage = New BitmapImage() bitmapImage.BeginInit() bitmapImage.UriSource = New Uri(dlg.FileName, UriKind.Absolute) bitmapImage.EndInit() imageContainer.Source = bitmapImage Catch ex As Exception End Try End If End Sub Private Sub btnDecode_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles btnDecode.Click ' Create barcode reader instance Dim reader = New Reader() reader.RegistrationName = "demo" reader.RegistrationKey = "demo" ' Specify barcode types to find reader.BarcodeTypesToFind.All = True ' Select specific barcode types to speed up the decoding process and avoid false positives. ' Show wait cursor Mouse.OverrideCursor = Cursors.Wait ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- Try ' Search for barcodes reader.ReadFrom(tbFileName.Text) Finally Mouse.OverrideCursor = Nothing End Try ' Display found barcode inforamtion: Dim stringBuilder = New StringBuilder() For i As Integer = 0 To reader.FoundBarcodes.Length - 1 Dim barcode = reader.FoundBarcodes(i) stringBuilder.AppendFormat("{0}) Type: {1}; Value: {2}.\r\n", i + 1, barcode.Type, barcode.Value) Next tbFoundBarcodes.Text = stringBuilder.ToString() End Sub End Class

Try ByteScout BarCode Reader SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK page

Explore ByteScout BarCode Reader SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next