I have a form that accepts encrypted input from a usb attached credit card terminal into a textbox. When the cursor is on this field I need to be able to prevent input from the keyboard. Is there a way in FoxPro to disable keyboard input for a single field?
A couple of thoughts...
How about if you set the text field to disabled so the user cannot type into the field, or set it to readonly.
Then, capture the info from the USB Port into a variable, and assign that value to the field.value property.
Steve
Bob -
>When the cursor is on this field I need to be able to prevent input from the keyboard.
The USB credit card reader I've used in the past would push a single string into the keyboard buffer when the card was scanned. This string contained all the information from the card's stripe - or at least the number, expiration month and year, and the name on the card.
In my case, it was used on an HTML form. The user would navigate to the credit card number field and then scan the card. Immediately some javascript would run which parsed out the details from the string and populated the individual fields of the form.
In any case, I think if you disable keyboard input, that might prevent you from getting the scanner data, assuming it pushes it to the keyboard buffer. Your card reader may work differently than what I've used. The card reader returned the string as plain text - no encryption was involved.
- Mike
Software Design of Kentucky