ByteScout Barcode Suite - VB.NET - Wpf ui barcode reading example with barcode reader sdk - ByteScout

ByteScout Barcode Suite – VB.NET – Wpf ui barcode reading example with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – VB.NET – Wpf ui barcode reading example with barcode reader sdk

wpf ui barcode reading example with barcode reader sdk in VB.NET and ByteScout Barcode Suite

Learn wpf ui barcode reading example with barcode reader sdk in VB.NET

Easy to understand coding instructions are written to assist you to try-out the features without the requirement to write your own code. ByteScout Barcode Suite was made to help with wpf ui barcode reading example with barcode reader sdk in VB.NET. ByteScout Barcode Suite is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK.

The below SDK samples describe how to quickly make your application do wpf ui barcode reading example with barcode reader sdk in VB.NET with the help of ByteScout Barcode Suite. If you want to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. Enjoy writing a code with ready-to-use sample VB.NET codes to implement wpf ui barcode reading example with barcode reader sdk using ByteScout Barcode Suite.

ByteScout Barcode Suite is available as a free trial. You may get it from our website along with all other source code samples for VB.NET applications.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next