Datamatrix barcode decoding in VB 6 using Barcode Reader SDK. Use the source code below to search image for Datamatrix barcode and decode it with Visual Basic 6.
VB6
Private Sub Form_Load() Set <span data-scayt_word="bc" data-scaytid="5">bc</span> = <span data-scayt_word="CreateObject" data-scaytid="7">CreateObject</span>("Bytescout.BarCodeReader.Reader") ' limit to <span data-scayt_word="Datamatrix" data-scaytid="4">Datamatrix</span> barcodes search only bc.TypeToFind = 4096 ' 4096=SymbologyFilter.FindDatamatrix bc.ReadFromFile "DatamatrixPhoto.jpg" For i = 0 To bc.FoundCount - 1 <span data-scayt_word="Msgbox" data-scaytid="9">Msgbox</span> "Found barcode on page #" & <span data-scayt_word="CStr" data-scaytid="10">CStr</span>(bc.GetFoundBarcodePage(i)) & " with type " & <span data-scayt_word="Cstr" data-scaytid="11">Cstr</span>(bc.GetFoundBarcodeType(i)) & " and value " & bc.GetFoundBarcodeValue(i) Next Set <span data-scayt_word="bc" data-scaytid="6">bc</span> = Nothing End Sub
The demo below shows how to read barcode Truncated PDF17 with BarCode Reader SDK: