?
Solved

Using Textboxes and buttons with Barcode Scanners

Posted on 2016-08-30
3
Medium Priority
?
159 Views
Last Modified: 2016-09-08
I have a ASP.net application that uses VB.net for the code behind.

The purpose of this application is to take input from a barcode scanner and input it into a database.

There are 4 textboxes and then a button that write the data to the database.

The problem that I am having is that the barcode scanners are used for another application and that application requires that the barcode scanners record a line feed carriage return each time a value is scanned.

The line feed, carriage return causes the button to execute because it has the focus.

Here is what I need to happen:

1) Barcode is scanned into textbox1 - the application should record the data in textbox #1 and then change the focus to textbox #2.
2) Barcode is scanned into textbox2 - the application should record the data in textbox #2 and then change the focus to textbox #3
3) Barcode is scanned into textbox3 - the application should record the data in textbox #3 and then change the focus to textbox #4
4) Data will be hand keyed into textbox4 - the application will then execute the click button event to write the data.

How can I do #1 thru #4 above taking into account the barcode scanner will have a carriage return line feed each time a value is scanned?
0
Comment
Question by:yonbret
3 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 41777922
from what I remember (my last barcode scanner project was about 10 years ago), even if a code is scanned, you are still receiving the KeyPress/KeyDown/KeyUp events right? If that is still the case, you can handle the CR code to focus on another control
0
 
LVL 36

Expert Comment

by:ste5an
ID: 41778024
When the other application does not use a start marker for the barcode transmission, then it is pretty hard.

I have to guess as it is a web application. The basic approach: hook into all keypress events. Then when a barcode start marker is sent, copy each character into a buffer and discard the bubbling to the control until you have received the barcode end marker. Then send the barcode from the buffer to the correct control.
0
 
LVL 6

Expert Comment

by:tncode
ID: 41778098
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 9 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question