问题
Please help me in differentiating the source of entry into textbox. I am currently using Barcode Scanner to enter a value into textbox also i need to enter the value manually from keyboard.
PowerBuilder 12.5 version.
回答1:
Use a singlelineedit control. Put the cursor there. User either scans barcode or types in entry.
The scanner simulates keyboard input. There is not really any way to differentiate between the two. If you use an OCX or COM type control to operate the scanner then you may be able to tell between them
来源:https://stackoverflow.com/questions/35148584/is-there-a-way-to-differentiate-from-barcode-scanner-entry-from-keyboard-key-pre