Huge Collections of Software Manuals and Knowledgebase

GreatManuals.com
Huge Collections of Software Manuals and Knowledgebase

 
Home Contact us Request to publish your help manuals Request to remove your help manuals

Introduction
 » Softek Barcode Reader
Barcode Toolkit Overview
 » Toolkit Interfaces
 » Supported Barcode Types
 » Program Sequence
 » Performance Considerations
Barcode Toolkit Examples
 » Visual Basic Using DLL
 » Visual Basic Using OCX
 » VB.Net
 » Borland Delphi
Methods
 » Methods
 » GetBarString
 » GetBarStringPos & GetBarStringRect
 » GetBarStringType
 » GetBarStringDirection
 » ScanBarCode
 » ScanBarCodeFromBitmap
 » ScanBarCodeFromDIB
 » SetScanRect
Properties
 » Properties
 » AllowDuplicateValues
 » BitmapResolution
 » Code39Checksum
 » ColorThreshold
 » ConvertUPCEToEAN13
 » LineJump
 » ErrorCorrection
 » ExtendedCode39
 » MaxLength
 » MinLength
 » MinOccurrence
 » MinSpaceBarWidth
 » MultipleRead
 » NoiseReduction
 » PageNo
 » Pattern
 » PdfBpp
 » PdfDpi
 » Photometric
 » PrefOccurrence
 » QuietZoneSize
 » ReadCodabar
 » ReadCode128
 » ReadCode25
 » ReadCode25ni
 » ReadCode39
 » ReadEAN13
 » ReadEAN8
 » ReadUPCA
 » ReadUPCE
 » ReadPatchCodes
 » ReadPDF417
 » ReadNumeric
 » ScanDirection
 » ShowCheckDigit
 » SkewTolerance
 » TifSplitMode
 » TifSplitPath
 » UseOverSampling
 

VB.Net

Barcode Recognition with VB.Net

Barcode Recognition Software

The Softek Barcode Toolkit is an application programmers toolkit which reads barcodes from image files and bitmaps - with a choice of 5 types of interface: DLL, OCX, COM , VB Wrapper Class and .NET.

There are 2 interfaces that can be used with VB.Net:

  1. 100% Managed .NET Component
  2. VB.Net Wrapper Class

100% .NET Managed Component

It's simple to read barcodes with 100% Managed .NET Component:

Either
Download the example VB.Net project that shows you how to use the component.

Or

Open or Create a VB.Net Project.
From the project menu select "Add Reference" and browse for the SoftekBarcodeLib.dll file in the windows system folder.
See the code below for a simple example of how to use the SoftekBarcode class.

Barcode Generator Bookkeeping software Barcode software
Business financial software Billing software Accounting software

 

Declarations section:

Dim barcode As SoftekBarcodeLib.BarcodeReader
Dim nBarCode As Short
Dim strBarcode As String
Dim bm As Bitmap

In the New subroutine:

barcode = New SoftekBarcodeLib.BarcodeReader()
In the code where you want to read a barcode:

' Barcode might be in any direction
barcode.ScanDirection = 15
' Only look for EAN-8 barcodes
barcode.ReadCode128 = False
barcode.ReadCode39 = False
barcode.ReadCode25 = False
barcode.ReadEAN13 = False
barcode.ReadEAN8 = True
barcode.ReadUPCA = False
barcode.ReadUPCE = False
' Scan every line of the image
barcode.LineJump = 1

nBarCode = barcode.ScanBarCode("C:\Program Files\Softek Software\Softek Barcode Toolkit\pen.jpg")

' Or read the barcode from an image in a PictureBox
' bm = New Bitmap(Me.PictureBox1.Image)
' nBarCode = barcode.ScanBarCodeFromBitmap(bm.GetHbitmap())

If (nBarCode < 0) Then
MsgBox("Error reading barcode")
ElseIf (nBarCode = 0) Then
MsgBox("No barcode found on this image")
Else
strBarcode = barcode.GetBarString(1)
MsgBox(strBarcode)
End If

VB Wrapper Class

It's simple to read barcodes with VB.Net:
Either
Download an example VB.Net project that shows you how to use the SoftekBarcode Class.

Hint: The SoftekBarcode Class uses "Get" and "Set" methods to access properties. For example, to get the value of the LineJump property call GetLineJump(), and to set the value call SetLineJump(newValue).

Or

Open or Create a VB.Net Project.
From the project menu select "Add Existing Item" (Shift Alt A) and browse for the SoftekBarcode.vb class, which will usually be found in C:\Program Files\Softek Software\Barcode\DLL.
See the code below for a simple example of how to use the SoftekBarcode class.

Declarations section:

Dim barcode As SoftekBarcode
Dim nBarCode As Short
Dim strBarcode As String
Dim bm As Bitmap

In the New sub routine:

barcode = New SoftekBarcode()

In the code where you want to read a barcode:

' Barcode might be in any direction
barcode.SetScanDirection(15)
' Only look for EAN-8
barcodes barcode.SetReadCode128(False)
barcode.SetReadCode39(False)
barcode.SetReadCode25(False)
barcode.SetReadEAN13(False)
barcode.SetReadEAN8(True)
barcode.SetReadUPCA(False)
barcode.SetReadUPCE(False)
'Scan every line of the image
barcode.SetLineJump(1)

nBarCode = barcode.ScanBarCode("C:\Program Files\Softek Software\Softek Barcode Toolkit\pen.jpg")

' Or read the barcode from an image in a PictureBox
' bm = New Bitmap(Me.PictureBox1.Image)
' nBarCode = barcode.ScanBarCodeFromBitmap(bm.GetHbitmap())

If (nBarCode < 0) Then
MsgBox("Error reading barcode")
ElseIf (nBarCode = 0) Then
MsgBox("No barcode found on this image")
Else
strBarcode = barcode.GetBarString(1)
MsgBox(strBarcode)
End If

Home | Contact us | Request to publish your help manuals | Request to remove your help manuals