Problem When read qr using barcode scanner for more than one it append the same textbox4 . i need to clear data after every scanning done .
Details
I using usb scanner reader qr code with type metro logic working as keyboard
and using USB
i read data in textbox4 key down success
but problem if i read data for new qr code
it append in same text box
so that what i do to clear the data recieved before and prevent append to old
my code
private void textBox4_KeyDown(object sender, KeyEventArgs e)
{
string[] lines = textBox4.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (lines.Length > 4)
{
textBox1.Text = lines[1].Substring(lines[1].IndexOf(":") + 1);
textBox2.Text = lines[2].Substring(lines[2].IndexOf(":") + 1);
textBox3.Text = lines[3].Substring(lines[3].IndexOf(":") + 1);
textBox5.Text = lines[4].Substring(lines[4].IndexOf(":") + 1);
}
textbox4 read data from reader device then split them to textboxes