I am writing an application to scan bar code and show it to the text box. I am using Motorola MC3190 device runs on Windows Embedded compact 7.0. To implement barcode scanning, I used Symbol.dll and Symbol.barcode.dll.
I have an issue that device is scanning the bar codes but eliminate the characters before and after the spaces. My code is
private void Form1_Load(object sender, EventArgs e)
{
txtBarcode.Focus();
barcodeReader = new Symbol.Barcode.Reader();
barcodeReaderData = new Symbol.Barcode.ReaderData(Symbol.Barcode.ReaderDataTypes.Text, Symbol.Barcode.ReaderDataLengths.MaximumLabel);
barcodeReader.Actions.Enable();
barcodeReader.ReadNotify += new EventHandler(barcodeReader_Read);
barcodeReader.Actions.Read(barcodeReaderData);
}
private void barcodeReader_Read(object sender, EventArgs e)
{
Symbol.Barcode.ReaderData nextReaderData = barcodeReader.GetNextReaderData();
txtBarcode.Text = nextReaderData.Text;
barcodeReader.Actions.Read(barcodeReaderData);
}
This code scans bar codes without spaces.
FYI: Earlier Motorola MC3190 could not scan the characters before and after the spaces, but after contacting the Motorola support team, they told me some changes in the device. Now the device is accepting barcodes with spaces. I checked in datawedge demonstration.
Now I am using symbol assembly that means I am overriding the existing functionality in my code but no luck so far.
When I scan this barcode in my application, it is skipping first digit 0 and last digit 2. textbox only shows 825610. But when I try scanning the same barcode in Datawedge Demonstration (software comes with device to test the barcode scanning) it shows 082566102