I have several textboxes (name, address, etc) to be filled in by typing on a keyboard. I have a keyboard routine that gets fired with each press ogf a key:
[quote] static void CharDown(USBH_Keyboard sender, USBH_KeyboardEventArgs args)
string nuchar = args.KeyAscii.ToString();
if (selector==1) TestTexBox1.Text = TestTexBox1.Text + nuchar; //append incoming to textbox1 if (selector == 2) TestTexBox2.Text = TestTexBox2.Text + nuchar; //append incoming to textbox2 if (selector == 3) TestTexBox3.Text = TestTexBox3.Text + nuchar; //append incoming to textbox3 }[/quote]
However, since there are many textboxes it seems a bit backwards to try to figure out where to send the chars (to various textboxes) from within this routine, perhaps by setting a selection parameter in the main routine. Is this the proper arrangement?