November 24th, 2003, 04:10 PM
From TextBox to Submit Button
I've been developing an Inventory Update application to replace our old DOS based version for our family bookstore, and ran into one simple problem that I'm not exactly sure how to handle - I am only assuming there is a simple solution for it I am overlooking.
The scanners that we use for inventory upon reading a barcode automatically send a carriage return at the end of the scan ... so what I am looking to do is having it automatically press the "Submit" button as soon as the scanner scans the text into the textbox and sends the carriage return.
An example of what I am trying to accomplish is the "Find" dialog of Internet Explorer (Ctrl-F) ... when you start typing into the textbox it doesn't take away the focus from the "Find Next" button, so that way when you're done typing all you have to do is hit enter, not click the button manually.
The reason I want to do it like this is so the inventory personnel don't need to scan the book then click "Submit" but rather all they have to do is keep scanning, better productivity.
As an aside, I am using C# and the Visual C# .NET IDE.
Thank you all in advance for your help.
With Regards, Charles O'Brien
November 27th, 2003, 09:21 AM
I assume no one has any idea?
November 28th, 2003, 12:20 PM
Simply add a subroutine for when the text changes in the textbox.
Being as the code is being entered as one value (instead of a single character at a time), this should work just fine.
Upon the text changing, you can direct it to do whatever you wish, including submitting the data and returning focus to control of your choice.
I cannot however, give you code for this though, since I do not code C#. :P
November 30th, 2003, 12:14 PM
Pick a symbology which encocdes control characters
You need to pick up a symbology which can encode controrl characters such as Code 39 extended,Code 93 and code 128. Then you design the protocol in your application. Once you get the information, finish the input when it sees the control input. Very easy. Take a look at http://www.morovia.com or http://www.barcodeschool.com for more information.