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
  1. Home
  2. General Programming
  3. Visual Basic
  4. ubstitute of keys press event

ubstitute of keys press event

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
3 Posts 3 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.
  • P Offline
    P Offline
    pdnet
    wrote on last edited by
    #1

    I am using vb.net 2008 I want to take Input in a text box from other defice like Barcode Scan or Card Swipe. But I need to Stop Manual input from keyboard on That TextBox. I Test in my code That in Both Cases "KeyPress Event" Called. How Can I do that? Textbox taken Input from Other Device and Not From Keyboard.

    Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

    D D 2 Replies Last reply
    0
    • P pdnet

      I am using vb.net 2008 I want to take Input in a text box from other defice like Barcode Scan or Card Swipe. But I need to Stop Manual input from keyboard on That TextBox. I Test in my code That in Both Cases "KeyPress Event" Called. How Can I do that? Textbox taken Input from Other Device and Not From Keyboard.

      Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      How does the scanner pass in the values to the text box? If it is via code, then why do you need a text box at all, and use a label to display the scanner input......

      Dave GoogleWave: dave.m.auld[at]googlewave.com Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

      1 Reply Last reply
      0
      • P pdnet

        I am using vb.net 2008 I want to take Input in a text box from other defice like Barcode Scan or Card Swipe. But I need to Stop Manual input from keyboard on That TextBox. I Test in my code That in Both Cases "KeyPress Event" Called. How Can I do that? Textbox taken Input from Other Device and Not From Keyboard.

        Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Since most of those devices are keyboard emulators anyway (normally refered to as "keyboard wedge") you cannot disable the keyboard. You would find it extremely difficult to tell the difference between a normal keyboard key and one coming from the scanner. You normally would not even bother with the textbox but enable the forms KeyPreview property, then handle it's KeyDown event, looking for the prefix string that is prepended to the code coming from the scanner. You ARE using pre- and post-fix codes coming from the scanner, right? If not, you'll find it impossible to tell the difference between what it typed and what is scanned. All of the characters you see after the prefix string will be whats scanned, until you see the postfix characters. When you see the prefix code, you do NOT pass the keystrokes up the chain to the textbox.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        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