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...