Welcome! Log In Create A New Profile

Advanced

Bar code scanning

Posted by gga 
gga
Bar code scanning
July 31, 2020 05:19PM
I am about to tackle a new WinDev project which involves scanning Bar Codes. I have done this in the past but it was a very long time ago and it was not using WinDev. At that time most Bar Code Scanners were serial devices but I see that now many are USB or Bluetooth. A cursory look at the WinDev Help file seems to indicate that it supports serial devices but I would prefer cordless readers.
I have a meeting with the client next week and I would appreciate any input regarding things I should be aware of from someone who has done this in WinDev. I am using WinDev22.
Thanks,
Garry
Argus
Re: Bar code scanning
July 31, 2020 08:42PM
Most, if not all, barcode scanners have TWO modes : serial and keyboard emulation.

- serial : even in USB or wireless, they come with a driver that make them seen as a serial device usable with the wlanguage sxxx fonctions
- keyboard emulation : everything scanned comes in as a keyboard entry, in the CURRENT FIELD

so in keyboard mode, you need to make sure that the correct field has the focus when scanning, or add a prefix to the scan so that it GETS the focus before the real data arrives

In serial mode, you can use events to detect a scan and act accordingly.

Both modes have their advantages, and of course the coding logic is quite different.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: