Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Credit card swipe
Message
De
03/03/2010 21:40:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01451846
Message ID:
01452398
Vues:
58
>>Hi All:
>>
>>I have a form that has a label: 'Please swipe the Credit card or press escape'. It also has an edit box that has focus, so that when the credit card is swiped about 50 characters are entered.
>>
>>How do I execute a method when either: escape is pressed OR the characters have finished being entered from the swipe?
>>
>>Thanks,
>>
>>Yossi
>
>Add code into the KeyPress event. A lot of keyboard wedge style scanners (barcode and CC) force a carriage return at the end of the string. You can intercept both the ESC or CR:
>
>
>IF nKeyCode = 27 && ESC
>ENDIF
>
>IF nKeyCode = 13 && ESC
>ENDIF
>
>
>If the reader terminates with another character as Tracy mentioned, you can capture it here as well.

Thanks for all the valuable info. I got it to work

Now:

I'm using an edit box to capture the swiped data. Two questions:

1. I don't want the user to see the edit box. However, if I set visible .f., it will not accept data.

2. With the edit box, I do not want the user to key in data, except for Escape or perhaps a '1', but otherwise I want nothing to happen if he doesn't follow instructions and keys in other data. How do I do that?

Thanks,

Yossi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform