问题
Hello everyone I'm using a RFID scanner that puts the scanned code in whatever text field available at scanning time. For instance, it could put the text inside a cell in Excel or in the address bar of a web browser.
I made an application with a textbox that receives the input sent by the scanner, but I want to disable user-input (keyboard). I tried setting the textbox property "read only" to true, but then the text is not displayed in the textbox.
How can I do that? Thanks in advance :)
回答1:
Most barcode scanners are just keyboard input. This would could be done via intercepting HID calls or intercepting key press events in the input box. I wouldn't expect that to work well, but good luck.
来源:https://stackoverflow.com/questions/12482312/prevent-keyboard-input-but-allow-automatic-scanner-input-on-textbox