Page 1 of 1

Barcode1DReaderDoScan Argument not Optional

Posted: Thu Jun 10, 2010 6:09 pm
by Sbrunner
I took the "OCR" ActiveX Example to modify it to do the barcode. This is the code I added

Code: Select all

  Imaging1.SetNativeImage (GdViewer1.GetNativeImage)
Imaging1.SetLicenseNumber1DBarcodeRecognition ("XXX") 'Replace XXX by a commercial or a demo key
Imaging1It.Barcode1DReaderDoScan
For i = 1 To Imaging1.Barcode1DReaderGetBarcodeCount
   MsgBox "Value: " + Imaging1.Barcode1DReaderGetBarcodeValue(i)
   MsgBox "Type: " + Str(Imaging1.Barcode1DReaderGetBarcodeType(i))
   MsgBox "Angle: " + Str(Imaging1.Barcode1DReaderGetBarcodeSkewAngle(i))
Next i
Imaging1.Barcode1DReaderClear
This code replaced the code in "Command4_Click"
When I try to run it, the error I get is "Argument not Optional" And it is highlighting "Barcode1DReaderDoScan"
Any help would be greatly appreciated.

Re: Barcode1DReaderDoScan Argument not Optional

Posted: Fri Jun 11, 2010 2:12 pm
by Loïc
Hi,

As the error message said you omit to mention a parameter.

Just replace

Code: Select all

Imaging1It.Barcode1DReaderDoScan
by

Code: Select all

Imaging1.Barcode1DReaderDoScan (BestQuality) 'Or BestSpeed

Kind regards,

Loïc

Re: Barcode1DReaderDoScan Argument not Optional

Posted: Fri Jun 11, 2010 4:34 pm
by Sbrunner
I have done that, and now the compile error is "Ambiguous name detected: BestQuality"

Thanks,
~Justin

Re: Barcode1DReaderDoScan Argument not Optional

Posted: Wed Jun 16, 2010 7:24 pm
by Sbrunner
Still havent found a solution.

Re: Barcode1DReaderDoScan Argument not Optional

Posted: Thu Jun 17, 2010 1:21 pm
by Loïc
Hi,

Sorry for the delay. Well you can do that;

Code: Select all

call Imaging1.Barcode1DReaderDoScan (1) 'for best quality
or

Code: Select all

call Imaging1.Barcode1DReaderDoScan (1) 'for best speed
Loïc