Barcode read 2d for Items Barcode Device DataLogic Lite QW2100 MODEL QY2100 CLASS QY2120-BK S/N G17079019
private void Form1_KeyPress(object sender, KeyPressEventArgs e) { TimeSpan elapsed = (DateTime.Now - _lastKeystroke); if (elapsed.TotalMilliseconds > 100) _barcode.Clear(); // record keystroke & timestamp _barcode.Add(e.KeyChar); _lastKeystroke = DateTime.Now; // e.KeyChar 52 '4' char // process barcode if (e.KeyChar == 13 && _barcode.Count > 0) { string msg = new String(_barcode.ToArray()); // MessageBox.Show(msg); label1.Text = msg; _barcode.Clear(); } }
Handled
true
private void Form1_KeyPress(object sender, KeyPressEventArgs e) { ... e.Handled = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)