I'm developing a POS (pet project) and I'm thinking of adding a bar code scanner to capture the sales faster. I do not have a scanner at the moment with me, and would like to ask some questions, as I'm stuck a bit.
On the sales screen my initial idea was to have an TEdit
component and when a person scans the product it would fill the TEdit
with the string. Now the problem I'm encountering is that I want to make the TEdit
invisible so that the person does not see it. But once you make the TEdit
invisible, you cannot set focus on it, so that plan cannot work.
So can anyone suggest what I can use to "capture" the scanned string? How would I make the component to listen and wait for the scanner? I assume that the scanner would be like a normal keyboard event, like button down or up.
You can use a TEdit with a height and width of 0 so it won't appears and make sure it get focused when you scan your barcode.