Accusoft BarcodeXpress v13.8 - Updated
GetBarcode Method
AccusoftBarcodeXpress13 ActiveX DLL > BarcodeXpress Object : GetBarcode Method
An integer value which represents the zero-based index number of the recognized barcode.
Description
Returns the data for the barcode found at the specified index value within the array returned by AnalyzeDIB.
Syntax
Visual Basic
Public Sub GetBarcode( _
   ByVal BarcodeNum As Integer _
) 
Parameters
BarcodeNum
An integer value which represents the zero-based index number of the recognized barcode.
Remarks

Valid values are from 0 to NumBarcodes -1.

The GetBarcode method should be called after the AnalyzehDib or AnalyzeIPicture method has been called, and barcodes were found.

Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved, with solved barcodes ordered before unsolved barcodes) will be sorted using the following criteria:

Example
Example - GetBarcode Results in an array
Copy Code
'Sort the results top to bottom
        Dim BarcodeArray() As BarcodeInfo
        Redim BarcodeArray(0 To BarcodeXpress1.NumBarcodes - 1)
        ' fill the user type array
        For i = 0 To BarcodeXpress1.NumBarcodes - 1
            BarcodeXpress1.GetBarcode i
            BarcodeArray(i).CodeName = BarcodeXpress1.BarcodeCodeName
            BarcodeArray(i).result = BarcodeXpress1.BarcodeResult
            BarcodeArray(i).CheckSumOK = BarcodeXpress1.CheckSumOK
            BarcodeArray(i).Confidence = BarcodeXpress1.Confidence
            BarcodeArray(i).Length = BarcodeXpress1.ResultLen
            BarcodeArray(i).X = BarcodeXpress1.BarcodeX
            BarcodeArray(i).Y = BarcodeXpress1.BarcodeY
            BarcodeArray(i).H = BarcodeXpress1.BarcodeH
            BarcodeArray(i).W = BarcodeXpress1.BarcodeW
        Next i
        ' actual sort results top to bottom
        Dim temp As BarcodeInfo
        For i = Ubound(BarcodeArray) - 1 To 0 Step -1
            For j = 0 To i
                If BarcodeArray(j).Y > BarcodeArray(j + 1).Y Then
                    temp = BarcodeArray(j + 1)
                    BarcodeArray(j + 1) = BarcodeArray(j)
                    BarcodeArray(j) = temp
                End If
            Next
        Next
See Also

BarcodeXpress Object  | BarcodeXpress Members

Is this page helpful?
Yes No
Thanks for your feedback.