Barcode Reader Demo
Attached is a demo application showing some aspects of barcode scanning in C# on ITC devices. The demo source is written against CF2 and needs the right ITC datacollection runtime installed.
Datacollection runtimes (DC_NET.CAB) location:
├───WCE300
│   └───Pocket PC 2002
│       ├───Arm
│       └───X86
├───WCE420
│   ├───CV60
│   │   └───X86
│   ├───iCE-Premium
│   │   └───Armv4i
│   ├───iCE-Standard
│   │   └───Armv4i
│   └───Pocket PC 2003
│       ├───Armv4
│       └───emulator
├───WCE500
│   ├───iCE50-CK60-A4i
│   │   └───Armv4i
│   ├───ITC_CE5.0
│   │   └───Armv4i
│   └───WM5.0
│       └───Armv4i
├───WCE600
│   └───WM6
│       └───Armv4i
└───XP
Here are some Screens of ScanDemo

The main code is the barcode read event handler. You have to wrap GUI updates in Delegate/Invoke or you will get problems earlier or later.
[csharp]/*$6
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
void BarcodeReader_BarcodeRead ( object sender, Intermec.DataCollection.BarcodeReadEventArgs bre )
{
brc = bre;
try
{
this.Invoke( new EventHandler(UpdateListBox) );
}
catch
{
}
}
/*
———————————————————————————————————————–
*
———————————————————————————————————————–
*/
protected void UpdateListBox( object sender, EventArgs e )
{
String  s;
string  sh;
String  t;
if ( brc.Symbology > 0 && brc.Symbology < 0x20 )
{
t = bctype[brc.Symbology];
}
else
{
t = "n/a " + brc.Symbology.ToString();
}
s = "*" + brc.strDataBuffer + "* – " + t;
/* convert control codes */
byte[] ba;
ba = brc.DataBuffer;
sh = s;
try
{
sh = HexEncoding.ToMixedString( ba );
}
catch( Exception ex )
{
System.Diagnostics.Debug.WriteLine( ex.Message );
}
if ( bUseHexMode )
{
s = sh; /* use the hex mangled string */
}
/* add the data to display */
if ( bUseListMode )
{
lblBarcode.Items.Add( s );
lblBarcode.SelectedIndex = lblBarcode.Items.Count – 1;
}
else
{
txtBarcode.Text = s;
}
}[/csharp]
Windows Mobile 5.x / 6.x Runtime [Download not found]
ScanDemo5 Application [Download not found]
ScanDemo5 Source (VS2005) [Download not found]



 
 http://www.led-mg.de
http://www.led-mg.de