Item Method

Description

Gets one of the barcodes specified by index.

Syntax

Public Function Item( _
    ByVal iIndex As Long _
) As BarcodeResult

Parameters

iIndex
The index of barcode within the array. The first item is zero.

Return Value

Returns a barcode. Refer to BarcodeResult.

Example

Dim reader As New DBRCtrl.BarcodeReader
Dim rdOption As New DBRCtrl.ReaderOptions
Dim oBarcodeFormat As New BarcodeFormat
rdOption.MaxBarcodesNumPerPage = 1
rdOption.BarcodeFormats = _
        oBarcodeFormat.OneD  Or _ 
        oBarcodeFormat.QR_CODE Or _
        oBarcodeFormat.PDF417 Or _
        oBarcodeFormat.DATAMATRIX
Set reader.ReaderOptions = rdOption
reader.DecodeFileRect "c:\test.bmp" 0 0 100 100
Dim iCount As Integer
Dim oBarcodes As BarcodeResultArray
Set oBarcodes = reader.Barcodes
iCount = oBarcodes.Count
For i = 0 To iCount - 1
   Dim bc As BarcodeResult
   Set bc = oBarcodes.Item(i)
   MsgBox bc.BarcodeText
Next i
Set reader = Nothing
Set rdOption = Nothing
Set oBarcodeFormat = Nothing

Remarks

The file to read needs to be an image in the formats BMP, JPG, PNG or TIFF.