This sample demonstrates how to use BarCode Reader SDK for CF .NET 2.00 or higher for barcode decoding in Windows CE project
This sample has been included into trial version of the library and provides a simple GUI forms application to select image file to read barcode from
Hint: to copy image files into the device use File | “Configure..” menu in Windows CE emulator and set shared folder to the folder on your desktop computer. This folder will be mounted as a flash card to the Windows CE emulated device.
Sample input image for barcode recognition:
Barcode reading on Pocket PC 2003 (in emulator):
Form1.cs:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Bytescout.BarCodeReader; namespace GUITest.PPC { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void buttonBrowse_Click(object sender, EventArgs e) { textBoxResult.Text = ""; DialogResult result = openFileDialog.ShowDialog(); if (result == DialogResult.OK) { string fileName = openFileDialog.FileName; Reader reader = new Reader("support@bytescout.com", "3ADC-EF29-95B5-6C09-5B7"); reader.ReadFrom(fileName); if (reader.FoundBarcodes.Length != 0) { foreach (FoundBarcode barcode in reader.FoundBarcodes) textBoxResult.Text += String.Format("Type '{0}' and value '{1}' ", barcode.Type, barcode.Value); } else textBoxResult.Text = "No barcodes found"; } } } }