Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Disable Keyboard's Keys?

Disable Keyboard's Keys?

Scheduled Pinned Locked Moved Visual Basic
databasehelpquestioncsharp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    viettho
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • V viettho

      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

      R Offline
      R Offline
      Rizwan Bashir
      wrote on last edited by
      #2

      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

      V 1 Reply Last reply
      0
      • R 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

        V Offline
        V Offline
        viettho
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups