Disable Keyboard's Keys?
-
Hello Everyone, I have a vb.net application deployed the query the db using a card swipe(mag stripe/card reader) using a textbox. My problem is they want to restrict typing in the card number they want the to force the user to swipe the card for security purposes. Can I disable the keyboard (and mouse, if possible) when my app is running or can I disabled the keyboard keys. How can I resolved this issue. Also, I cound not set the properties readOnly to true because when I swipe the card it reacts on the keydown event. Is there any other way to restrict the user from typing the values to the textbox? Any suggestions will be greatly appeciated. Thanks
-
Hello Everyone, I have a vb.net application deployed the query the db using a card swipe(mag stripe/card reader) using a textbox. My problem is they want to restrict typing in the card number they want the to force the user to swipe the card for security purposes. Can I disable the keyboard (and mouse, if possible) when my app is running or can I disabled the keyboard keys. How can I resolved this issue. Also, I cound not set the properties readOnly to true because when I swipe the card it reacts on the keydown event. Is there any other way to restrict the user from typing the values to the textbox? Any suggestions will be greatly appeciated. Thanks
the last key in the swapping is vbcrlf and in the user enters from the keyboard then it is not . so you can trap from this point. second thing is you have to get the time of first key and last key. from swapping every thing will happen in one second and from user it will take more time. so what you can do is take the time when first key is pressed and wait till vbcrlf is enterer. if the time span is less then 1 second then card swapped other wise user has typed. if no one has better idea then this is the best idea. Rizwan Bashir
-
the last key in the swapping is vbcrlf and in the user enters from the keyboard then it is not . so you can trap from this point. second thing is you have to get the time of first key and last key. from swapping every thing will happen in one second and from user it will take more time. so what you can do is take the time when first key is pressed and wait till vbcrlf is enterer. if the time span is less then 1 second then card swapped other wise user has typed. if no one has better idea then this is the best idea. Rizwan Bashir
Thanks for the answer, but the problem is when user swipe the card, it's read in keypress event of the textbox, therefore, you can actually see the moving text. My problem is while it's reading, user can type on the keyboard, creating extra text, and that would cause error in parsing credit card info. I'm looking for a way to temporary disable (lock) keyboard until the reading credit card is done. If anyone has any other solution, I appriciate it. Thanks.