CodePudding user response:
Edit1 - & gt; SetFocus ();Or
ActiveControl=Edit1;
CodePudding user response:
In BCB is for the first time,,,, the SetFocus this function directly to the written text box? It is best to write a demoCodePudding user response:
- try indeed has been the focus in the text box but I really want to achieve the effect of a sweeping code gun is equivalent to a USB keyboard input I want to achieve the purpose of a sweeping code gun data can receive all show but in practice the mouse to click on other such sweeping code gun data will not be able to display the sweep how can read all of the data code gunCodePudding user response:
If your form is only one input box is better to do, to make sweeping code has been in the focus state gun corresponds to the text box is ok, if there are multiple input box, due to the sweeping code gun is equivalent to the keyboard input, can't guarantee is input to the barcode of the box, can only let the user actions to ensure the focus in the input box using sweep code gun, whenCodePudding user response:
You need to click a for the, for example, in the final Button1Click to 1: Edit1 - & gt; SetFocus ();All need to click on this kind of treatment,
CodePudding user response:
Actually when you sweep code is a success, but no focus, system does not know where should sweep the yard of things written in,,,CodePudding user response:
,,, I just want to know - flicking code gun out how data is stored in the absence of focus,,,CodePudding user response:
Make a popup windowCodePudding user response:
USB seems bad treatment if changed to a serial port or so can be used to monitor