2013-07-24

C# Barcode 讀碼讀取, 自動更新

        private void tbxSerial_KeyPress(object sender, KeyPressEventArgs e)
        {
              
            if (barcode == "")
            {
                tbxSerial.Text = "";
            }           

            barcode += e.KeyChar;          

            if (e.KeyChar == (char)Keys.Enter)
            {
                //tbxSerial.Text = "";
                tbxSerial.Text = barcode;
                barcode = "";
            }
        }

沒有留言: