Solved

Using Textboxes and buttons with Barcode Scanners

Posted on 2016-08-30
3
46 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 69

Accepted Solution

by:
Éric Moreau earned 500 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 32

Expert Comment

by:Stefan Hoffmann
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now