ClearImage COM API
FirstBarcode Method
CiBarcodePro Object : FirstBarcode Method
Description
Find the first barcode
Syntax
Visual Basic
Public Function FirstBarcode() As CiBarcode
Remarks

Use FirstBarcode/NextBarcode methods when searching for barcodes with specific requirements, e.g., prefix presence in CiBarcode.Text value

Example
Sub ReadBarcodes1DFirstNext(imageFile As String)
   ' Create objects and open input images
  Dim Ci As New CiServer: Dim Barcode As CiBarcode
  Dim reader As CiBarcodePro: Set reader = Ci.CreateBarcodePro
  reader.Image.Open imageFile
    ' Configure reader
  reader.Type = cibfCode39 + cibfCode128  ' Select barcode types to read
  '  reader.AutoDetect1D = ciTrue  ' Enable automatic detection of barcode type (Slower processing)
  '  reader.Directions = cibHorz   ' Limit barcode search direction (Faster processing)
  Set Barcode = reader.FirstBarcode
  Do While Not Barcode Is Nothing
     Debug.Print Barcode.Text & vbCrLf
     ' If (barcodeFound) Then Exit For '  End processing after the first barcode matching specific requirements is found
     Set Barcode = reader.NextBarcode
  Loop
End Sub
See Also

CiBarcodePro Object  | CiBarcodePro Members