473,660 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET: Reading Barcode into Another Control

4 New Member
Howdy.

I'm trying to read a barcode using a IE scanner.
The code is read into a textbox.

I use the textchanged event to trigger code behind so the barcode numbers are transferred into a dropdown list.
The only issue is that the event must look at each individual character. The DD list is then populated with a progrssive list of all the characters in the barcode.

How does .NET see the characters coming in?
Am I using the correct event to read the barcode?

Thanks
Oct 25 '06 #1
5 3322
DeWittds
11 New Member
Bobdude,
I am currently working on the same type of thing. What I did was have it do "whatever" when the textbox lost focus. And then in my case reset the focus and select all to the same text box so it is ready to except another barcode. Let me know if you need more info. This happens to be the first thing I have done in vb.net and have not had to write any since vb5.

Dave
Oct 26 '06 #2
BobDude
4 New Member
------

Thanks for the comeback, Dave.

My scanner input is really primative right now.
When I scan a barcode, I know the _TextChanged sub is executed which loads a textbox with the digits, one character at a time.
All I do now is check to see if the length of the textbox is = 12.
Then it runs a _Validated sub that adds the 12 characters in the textbox to a dropdown list.
Then it clears out the Textbox.

One issue I have is trying to determine how long the input really is, in case the barcode scanned is not equal to 12. If I can determine when the character input stops, then I can dispense with the length check of 12 and just add the code to the dropdown list.

Any ideas how to do that?

Thanks - BD
Oct 26 '06 #3
Killer42
8,435 Recognized Expert Expert
I find that in a situation like this it can be helpful to write out a message (preferably to a text file, or maybe just the debug window) in every event for the control in question, and any events for the form that sound like they could be relevant. Then perform your action, then scan the log and see exactly what events happened, in which sequence.

Being shown in this way exactly what events fire sometimes makes it obvious which one(s) to use.

(Note, using a MsgBox or similar to show on the fly what's happening can actually change the sequence of events.)
Oct 26 '06 #4
jbarbara
1 New Member
I set up the barcode device to add a suffix to the data being read - something that will never be part of the data. In my case I chose the dash sign ( - )

Then in the etextbox_change d event I just check whether the input box endswith "-" and if so I chop off the "-" and copy the contents of the texbox to wherever.

My problem is that the device is suddenly adding an extra "S" at the end, and since it's being added AFTER the dash, I would have already cleared the textbox, and end up with the S there - jeopardizing my next barcode scan.

Funnily enough this only happened with three barcodes out of 500.

I wonder if I can clear the keyboard buffer within VB.NET

Anyone has an idea?
Oct 5 '07 #5
Killer42
8,435 Recognized Expert Expert
Just a thought - perhaps this is a glitch in the scanner and needs servicing. You can't really reqwrite your software to deal with every possible thing that goes wrong with the hardware.
Oct 6 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
5303
by: Tom Turner | last post by:
Here's the background on my situation. The question follows --- We have 600 units of mail going from our business to various Post Offices every morning. Every unit is accompanied by a paper Verification form which is signed and dated by a postal employee and returned to our office as proof of delivery. The Verification contains a 24 character barcode which holds a non-unique 5 digit postal zip code at pos 5-9, and a unique 10- digit...
4
9254
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And this differences increases with the increase number of labels. The code is as follwods: Here rdr = OleDbDataReader Font is Times New Roman, 12pt
4
2119
by: | last post by:
Hi all, we have a need to barcode encode and display a record identifier (number) both in html in the browser and through fdf in adobe acrobat in realtime. Is this possible? Can anyone make any recommendations on software to do this? thanks!
4
8939
by: Mat | last post by:
Does anyone know how to generate ,print and read barcode with VB.NET?
5
5426
by: neilphan | last post by:
Hi all, I have an application that uses input from a barcode reader via a USB port. My application works fine only if the application HAS FOCUS. If the user opens up another application (not mines) such as notepad/word, etc, the Barcode Reader reads data into the applicaton that currently has focus with is notepad/word but not my own applicaton. My question is as follows: Is there a way to write a Listener
6
3377
by: Samuel Shulman | last post by:
I would like to add barcode functionality to my POS program How does one attach barcode reader is it usually USB port How can the program get the data read by the device Thank you, Samuel
0
1141
by: mail | last post by:
The new version of Barcode.dll is available. Barcode.dll is a powerful .NET component for creating barcode images. You can easily integrate barcodes with your application using any .NET language. It supports most barcode sybologies (Code39, Interleaved 2 of 5, Code 128). It includes:
4
4292
by: madunix | last post by:
I am in the process to create an online form using PHP with DB Oracle or MySQL, this form which consist of 2x parts personal data and finance data, and it will be filled by the users, once the form is filled and submitted , it will be saved to the system as reference and printed as hardcopy it could be a pdf or not, but the print format will be on A4 format hardcopy with printed random generated (internal calculation) bar code printed on...
2
4909
by: chris_gpf1 | last post by:
Hi, I'm working on a website where the user will have to scan a barcode with a serial barcode scanner. I get the scanner working and reading the barcode, but when I want to write the string in a Textbox, it's not working. The Textbox remain blank. Here's the code:
0
1834
by: Fuc | last post by:
hi experts, We are using the Symbol MC9090G scanners, and use the symbol SMDK 1.5 for .NET to develop the WinCE form application, the tools we are using is VS2005 professional and C#. We are using Symbol.Barcode namespace class to read barcode and do some logic etc. the code just like: Symbol.Barcode.Reader _MyReader = new Reader();
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.