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

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

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

wpf ui barcode reading example with barcode reader sdk in VB.NET using ByteScout Premium Suite

How to apply ByteScout Premium Suite for wpf ui barcode reading example with barcode reader sdk in VB.NET

Every ByteScout tool includes sampleVB.NET source codes that you can find here or in the folder with installed ByteScout product. ByteScout Premium Suite helps with wpf ui barcode reading example with barcode reader sdk in VB.NET. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

This rich and prolific sample source code in VB.NET for ByteScout Premium Suite contains various functions and options you should do calling the API to implement wpf ui barcode reading example with barcode reader sdk. 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. Use of ByteScout Premium Suite in VB.NET is also described in the documentation included along with the product.

If you want to try other samples for VB.NET then free trial version of ByteScout Premium Suite is available on our website.

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next