GdPicture.NET Reference Guide
Barcode1DReaderGetBarcodeType Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : Barcode1DReaderGetBarcodeType Method
Barcode index. Must be between 1 and Barcode1DReaderGetBarcodeCount returned value.
Returns the type of a barcode detected by the Barcode1DReaderDoScan method.
Syntax
'Declaration
 
Public Function Barcode1DReaderGetBarcodeType( _
   ByVal BarcodeNo As Integer _
) As Barcode1DReaderType
public Barcode1DReaderType Barcode1DReaderGetBarcodeType( 
   int BarcodeNo
)
public function Barcode1DReaderGetBarcodeType( 
    BarcodeNo: Integer
): Barcode1DReaderType; 
public function Barcode1DReaderGetBarcodeType( 
   BarcodeNo : int
) : Barcode1DReaderType;
public: Barcode1DReaderType Barcode1DReaderGetBarcodeType( 
   int BarcodeNo
) 
public:
Barcode1DReaderType Barcode1DReaderGetBarcodeType( 
   int BarcodeNo
) 

Parameters

BarcodeNo
Barcode index. Must be between 1 and Barcode1DReaderGetBarcodeCount returned value.

Return Value

A member of the Barcode1DReaderType enumeration.
Remarks

This method is used in the "Barcode Recognition" Demo.

Example
Detecting all barcodes in an image.
Dim oGdPictureImaging As New GdPicture.GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("") 'Prompt the user to select an image
If imageId <> 0 Then
   If oGdPictureImaging.Barcode1DReaderDoScan(ImageID) = GdPictureStatus.OK Then 'Start barcode scanning process
      Dim BarcodeCount As Integer = oGdPictureImaging.Barcode1DReaderGetBarcodeCount()
      If BarcodeCount > 0 Then
         For i As Integer = 1 To BarcodeCount
            MessageBox.show("Barcode No: " & Str(i))
            MessageBox.show("Type: " & oGdPictureImaging.Barcode1DReaderGetBarcodeType(i).ToString)
            MessageBox.show("Value: " & oGdPictureImaging.Barcode1DReaderGetBarcodeValue(i))
            MessageBox.show("Angle: " & Str(oGdPictureImaging.Barcode1DReaderGetBarcodeSkewAngle(i)))
         Next
      Else
         MessageBox.show("No barcode detected !")
      End If
      oGdPictureImaging.Barcode1DReaderClear() 'Release detection info from memory
   End If
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members