Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Magnetic card reader 1

Status
Not open for further replies.

florindaniel

Programmer
Dec 4, 2009
120
RO
Hello,

I need to use a magnetic card reader to autheticate user acces in my application.
The USB device works very simple, like typing the serial code it was writen onto it,
but I can't find a way to use it.
I have a form containing an edit box, active when the form loads. This edit box
receives the code but since the code does not end in CR+LF, I don't know how to end waiting
for that code.
I mean : I would like to have this form popping up, waiting for the card to be read
and, once it is passed through the reader, the form should process the code and unload,
with no other command buttons.

Thank you,
Daniel
 
Hi Daniel,

In the Activate event of the form, execute this command:

SET CONFIRM OFF

and this in the Deactivate:

SET CONFIRM ON

That way, the form won't wait for the Enter key to be pressed once the card has been read.

You will also need to make sure that the length of the edit box is no longer than the number of characters in the code.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top