Hi! I have this code on my zebra mk500 device and works fine when I turn on the scanner with other app, but the question are , how I turn on the scanner when my app start?
private Symbol.Barcode.Reader MyReader = null;private Symbol.Barcode.ReaderData MyReaderData = null; private void Form1_Load(object sender, EventArgs e){ MyReader = new Symbol.Barcode.Reader(); MyReaderData = new Symbol.Barcode.ReaderData(Symbol.Barcode.ReaderDataTypes.Text, Symbol.Barcode.ReaderDataLengths.DefaultText); MyReader.ReadNotify += new EventHandler(MyReader_ReadNotify); MyReader.Actions.Enable(); MyReader.Actions.Read(MyReaderData); return; }private void Form1_Closing(object sender, CancelEventArgs e){ MyReader.Actions.Flush(); MyReader.Actions.Disable(); MyReader.Dispose(); MyReaderData.Dispose(); return; }private void MyReader_ReadNotify(object sender, EventArgs e){ System.Windows.Forms.MessageBox.Show(MyReaderData.Text, "HelloScan"); MyReader.Actions.Read(MyReaderData); return;}
How to turn on barcode scan reader? |
1 Replies
Hi,
Did you try setting AIM_TYPE_PRESENTATION? The MK500 has a sensor which detects movement, from the help file:
Symbol.Barcode Assembly > Symbol.Barcode Namespace : AIM_TYPE Enumeration
AIM_TYPE_PRESENTATION
Presentaion aim type; Appears idle until motion is detected in front of imager window at which time illumination is turned on along with the aiming pattern and a decode is attempted. Currently only the MK500 imager device supports this feature and works only when the soft trigger is enabled.