×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to use qr code reader?
2

How to use qr code reader?

How to use qr code reader?

(OP)
Hi everyone, my application work with rfid reader, then bought a qr code reader that could also reader an rfid… my problem is, the qr code reader never stops to beep and doesnt display anything… but when i use note pad and trying to tap the rfid it shows number (expected) my question is… is there something that i have to put in my code so the qr code reader reads the rfid? Thanks in advance… godbless…

RE: How to use qr code reader?

Let me repeat and go into a detail of what I suggested in another thread184-1818835: How to design Point of sale system? already:

Quote (myself)

The usual solution using a barcode scanner is programming a prefix the scanner sends before the barcode, the prefix will set focus to the product code textbox.

That addresses the comfort for the user. Instead of manually needing to set focus to a textbox to receive the barcode or RFID code, scanners often allow to program a prefix hotkey combination like CTRL+B for barcode or anything, look into the scanner manual as programming them - if possible - can differ a lot but mostly is done by scanning some special programming codes, which are printed in the manual. Well, and always read a manual of a device, it's mostly not just about warranty and things obvious to you, it contains valuable information.

Here's the deal about such a prefix, aka preamble: In VFP you can make the caption of a label be "\<Barcode:" - the essential thing here is the "\<B" combination, that's backslash lower-than and a letter. Which will cause ALT+B to set focus to the control next in TabIndex order. If the label has its Tabindex property set to 1, it will set focus to the control with Tabindex set to 2. And that can be the textbox receiving the barcode or RFID code.

So no matter which control currently has the focus in your application, as long as the active form is having such a label and the scanner is programmed to send ALT+B followed by the barcode or RFID code, that will first set focus to the input control and then it can receive the scanned data. That's the way I did it in one system. It could also be done with a function key and you could program ON KEY LABEL F5 _screen.activeform.txtBarcode.Setfocus() or something similar. IF the scanner only allows a function key preamble, that would be usable for a FoxPro application. to make the function key direct the following input to a specific control.

This is all a bit complicated, and your scanner might not allow to program it that way, but it's worth it, if it can be done, as now users won't need to think about setting focus to the right box in your form everytime they scan something that is automatic. And so as in any supermarket they can mainly concentrate on scanning all the barcodes or RFIDs.

It's also worth mentioning you can set a form property KeyPreview to .T., which will cause any keyboard input, no matter if there's no ALT+B or any hotkey first, any key input, to first be processed by the form.Keypressed() event. But that's even more complex to program, as this event will not receive the scanned data in one call, it will come in key by key, one letter or digit at a time and you can't detect whether that's just a normal user using the actual keyboard or this keypress is a virtual keypress coming from the scanner. You could program code which accumulates the single key inputs into a buffer (a property "lastkeys", for example) and then see whether and when it's a code you expected, like a sequence of 13 digits in fast and direct succession, if you take into account the time of each single input, too. So this buffer could "time out". It's just a sketch of an idea to do it that way, but I'd prefer programming the scanner to send a prefix to your application which is some ALT+something combination that works with whatever other hotkeys you defined in your application menu or other forms and labels.

Chriss

RE: How to use qr code reader?

Of course, the idea of labels with ome sort of "\<Y" caption works without a scanner, too. at allows setting focus by ALT+Y (in this case) and in general this and other keyboard mechanisms VFP offers can make an application usable without a mouse.

I know in a POS system users most often even have neither mouse nor keyboard, that's not making hotkeys a thing you think about automatically. But keep in mind scanners are acting as HID (humin input device) aka as a virtual keyboard and they can trigger hotkey behaviour, too, if programmed for it.

Chriss

RE: How to use qr code reader?

(OP)
Ok Chriss... Thanks... I'll try to figure it out using your suggestions....

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close