Home > Back-end >  Code gun problem
Code gun problem

Time:09-17

USB interface and code gun using the time of need to click the text box and then can sweep code success could you tell me how to set the focus in the c + + builder can not achieve click the text box can display sweep code data - that there has been no contact interface with c + + builder for Daniel to guide everyone

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 demo

CodePudding 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 gun

CodePudding 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, when

CodePudding 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 window

CodePudding user response:

USB seems bad treatment if changed to a serial port or so can be used to monitor
  • Related