Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using Textboxes and buttons with Barcode Scanners

Posted on 2016-08-30
3
Medium Priority
?
147 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 35

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 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