Hi Nguyen,
I am using generic USB barcode scanners and when the user has specific window opened, the window key event captures the data to an instance variable. As each character comes from the scanner, the key event fires and the KeyDown function checks the characters. I am using barcode 39 and the data should only be upper case alpha and numeric characters. As the characters are appended to the instance variable, the code in the event looks for the enter key from the scanner to indicate the end of the scan and then it will valid the data in the instance variable.
This is not the most common way to use barcode scanners with PB, but it works for me. If you are interested, I can provide the key event code.
Another method would be to use some type of data wedge software, but this is an extra expense.
Chris
I am not counting the characters as the key event fires, but this could be added for better validation.
Many USB scanners can be configurated with a different prefix and postfix. Some scanners can strip the prefix from the data, but I use the prefix in the event code and it is stripped off there.
Thank you , I have tried, but the key event of window object does not fire when users focus on a data window control.
- scanner allows to configurate with a different prefix and postfix, I think it ok to check, but only brand name scanner have these features.
Regards
Huy