Requirements
Windows | |
---|---|
x86 | x64 |
DynamsoftBarcodeReaderCtrlx86.dll | DynamsoftBarcodeReaderCtrlx64.dll |
Three Steps to Get Started
This is a simple example running in VB6.
-
Open VB6, create a new standard EXE project.
Then, add the library through Project > References...
-
Create a new button on the form and respond to its click event.
Please update the <your image file full path> and <your license key here> with valid values respectively in the code.
The licenses can be found in the [INSTALL FOLDER]\LicenseManager.exe.On Error GoTo ErrLabel Dim oBarcodeReader As New BarcodeReader oBarcodeReader.InitLicense "<your license key here>" oBarcodeReader.DecodeFile "<your image file full path>" Dim oBarcodeArray As BarcodeResultArray Set oBarcodeArray = oBarcodeReader.Barcodes Dim oTempStr As String oTempStr = oBarcodeArray.Count & " total barcode found." & vbCrLf Dim iIndex As Long Dim oBarcode As BarcodeResult For iIndex = 0 To oBarcodeArray.Count - 1 Set oBarcode = oBarcodeArray.Item(iIndex) oTempStr = oTempStr & " Result " & iIndex + 1 & vbCrLf oTempStr = oTempStr & " PageNum: " & oBarcode.PageNum & vbCrLf oTempStr = oTempStr & " BarcodeFormat: " & oBarcode.BarcodeFormat.TypeString & vbCrLf oTempStr = oTempStr & " Text read: " & oBarcode.BarcodeText & vbCrLf & vbCrLf Next Set oBarcodeArray = Nothing Set oOptions = Nothing Set oFormat = Nothing Set oBarcodeReader = Nothing MsgBox oTempStr Exit Sub ErrLabel: MsgBox Err.Description, vbCritical
- Run the project with your test barcode images, and see how it goes for you.