bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

Reading Barcodes in VB.Net

admin November 27, 2012 Software Development Kits No Comments

Using the Softek Barcode Reader SDK to read barcodes from images in a VB.Net project is very straight foward and this article should get you up and running in under 15 minutes…

Step 1.

Download the barcode reader sdk from here

If you are using a 64-bit system and want to handle PDF documents then please run REGISTER.BAT in the x86 folder before you continue.

 

Step 2.

Open your VB.Net project in Visual Studio or start a Windows Forms Application if you are starting from scratch.

 

Step 3.

Add a reference to the SoftekBarcodeLib3.dll…

Select Add Reference from the Project menu:

 

Then browse to the installation folder for the Softek Barcode Reader SDK and open the “anycpu” folder and select SoftekBarcodeLib3.dll:

Take a note of the location of the folder where the SDK is installed (not including the anycpu folder)

 

Step 4.

In the function where you want to read the value of a barcode from an image add the following code:

        Dim barcode As SoftekBarcodeLib3.BarcodeReader

        Try
            barcode = New SoftekBarcodeLib3.BarcodeReader("\path\to\the\sdk\installation\folder")
        Catch ex As System.DllNotFoundException
            MessageBox.Show("Could not locate the Softek Barcode Reader SDK Installation Folder")
            Return
        End Try

        barcode.MultipleRead = True

        Dim nBarCodes As Integer

        nBarCodes = barcode.ScanBarCode("somefile.tif")

        Dim i As Integer

        For i = 1 To nBarCodes
            MessageBox.Show("Found barcode with value " & barcode.GetBarString(i))
        Next

 

Step 5.

That’s it – all done. But don’t forget that there is a lot more to the sdk than just this. If you have any questions then please contact support@bardecode.com . Don’t forget we have lots of sample images under the toolkit installation folder and it’s always a good idea to try these first before your own images.

You also might wish to add some extra lines of code to turn on or off various barcode types and maybe set a license key:

barcode.ReadQRCode = True

barcode.LicenseKey = “MY LICENSE KEY”

← Reading Barcodes with Delphi using win32 dll
Codabar start/stop characters →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved