473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Barcode Reader

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
Jul 11 '06 #1
6 3354
Hi

There are many different types of barcode scanners. USB and PS2 are the
most common.

I have experience with PS2 scanners. Essentially they plug in to your
PS2 keyboard port and act like any other keyboard device. When a
barcode is scanned, it sends the characters through as if they were
typed on a keyboard. So for example, if your win form has a textbox
that has the focus, and you scan a barcode, the characters appear in
the textbox.

To program against this, the best way is to handle the keypress events
native to a windows form or any other control. Usually a barcode will
need to have a * at the front and back for the barcode scanner to pick
it up, but this can be configured on most scanners as well. The * will
be removed by the time it gets to your app so you don't need to account
for it.

Essnetially you can differentiate from the barcode scanned text and the
keyboard typed text by checking the speed in which the characters come
in. If they come in super fast, then most likely those chars were
scanned, if they come in slower, then they were typed.

You also need to consider what barcode font to use, and then ensure
your barcode scanner supports that font. There are a few common ones,
but its best to use one that supports alpha and numeric chars. You can
get very cheap Code39 scanners and the font is freely available on teh
web to download

Hope this helps.

Steven Nagy
Samuel Shulman wrote:
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
Jul 11 '06 #2
The USB versions work as below (keyboard wedge) or as an emulated serial
device, in which case, you can use the SerialPort from the toolbox to
get the data of the scanner.
Steven Nagy wrote:
Hi

There are many different types of barcode scanners. USB and PS2 are the
most common.

I have experience with PS2 scanners. Essentially they plug in to your
PS2 keyboard port and act like any other keyboard device. When a
barcode is scanned, it sends the characters through as if they were
typed on a keyboard. So for example, if your win form has a textbox
that has the focus, and you scan a barcode, the characters appear in
the textbox.

To program against this, the best way is to handle the keypress events
native to a windows form or any other control. Usually a barcode will
need to have a * at the front and back for the barcode scanner to pick
it up, but this can be configured on most scanners as well. The * will
be removed by the time it gets to your app so you don't need to account
for it.

Essnetially you can differentiate from the barcode scanned text and the
keyboard typed text by checking the speed in which the characters come
in. If they come in super fast, then most likely those chars were
scanned, if they come in slower, then they were typed.

You also need to consider what barcode font to use, and then ensure
your barcode scanner supports that font. There are a few common ones,
but its best to use one that supports alpha and numeric chars. You can
get very cheap Code39 scanners and the font is freely available on teh
web to download

Hope this helps.

Steven Nagy
Samuel Shulman wrote:
>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
Jul 12 '06 #3

Hope this helps.

Steven Nagy
Samuel Shulman wrote:
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

Steven Nagy wrote:
Hi

There are many different types of barcode scanners. USB and PS2 are the
most common.

I have experience with PS2 scanners. Essentially they plug in to your
PS2 keyboard port and act like any other keyboard device. When a
barcode is scanned, it sends the characters through as if they were
typed on a keyboard. So for example, if your win form has a textbox
that has the focus, and you scan a barcode, the characters appear in
the textbox.
Indeed. I was just playing with one of these last night.
To program against this, the best way is to handle the keypress events
native to a windows form or any other control. Usually a barcode will
need to have a * at the front and back for the barcode scanner to pick
it up, but this can be configured on most scanners as well. The * will
be removed by the time it gets to your app so you don't need to account
for it.
If that so? I was scanning barcodes in with the PS/2 keyboard wedge and
did not see any *s, whether in the console or in a textbox.
Essnetially you can differentiate from the barcode scanned text and the
keyboard typed text by checking the speed in which the characters come
in. If they come in super fast, then most likely those chars were
scanned, if they come in slower, then they were typed.
Unless the user cut&pasted the text, in which it comes in very fast.
You also need to consider what barcode font to use, and then ensure
your barcode scanner supports that font. There are a few common ones,
but its best to use one that supports alpha and numeric chars. You can
get very cheap Code39 scanners and the font is freely available on teh
web to download
CueCat! :)

B.

Jul 12 '06 #4
If that so? I was scanning barcodes in with the PS/2 keyboard wedge and
did not see any *s, whether in the console or in a textbox.
No the scanner removes the *'s before sending it down the line.
This is configurable as well. Generally you can download a set of
barcodes from teh manufacturer's website that, when scanned, setup the
barcode scanner to different settings.
Unless the user cut&pasted the text, in which it comes in very fast.
In this case, the key's being pressed are CTRL + V which are what would
be captured.
NOT the actual string buffer that was copied originally. So it should
still work.

Jul 12 '06 #5

Steven Nagy wrote:
If that so? I was scanning barcodes in with the PS/2 keyboard wedge and
did not see any *s, whether in the console or in a textbox.

No the scanner removes the *'s before sending it down the line.
This is configurable as well. Generally you can download a set of
barcodes from teh manufacturer's website that, when scanned, setup the
barcode scanner to different settings.
Perhaps each scanner is different. I didn't install any drivers for
this one.
Unless the user cut&pasted the text, in which it comes in very fast.

In this case, the key's being pressed are CTRL + V which are what would
be captured.
NOT the actual string buffer that was copied originally. So it should
still work.
Or Shift-Insert.

What if the past is effected programmatically, as through a
right-click, or through sendkeys?

B.

Jul 13 '06 #6
You'd really have to test it, but possibly the right-click -paste
might cause the keypressed event to fire, but I still doubt it. I guess
some tests are in order!
I'll run some on the weekend.

Jul 13 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom | last post by:
Using VB6, I want to read barcode data into an Access 2000 DB. What do you get when you read a barcode? Text or numbers. How do you define the field were the data would be stored? Thanks in...
5
by: sameer | last post by:
Hi, I have a client who wants to use barcode scanners with web pages( internet website). They want to scan the barcode no off a label and want this no to go straight to the focused text field on...
4
by: Mat | last post by:
Does anyone know how to generate ,print and read barcode with VB.NET?
5
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...
3
by: PaoloB | last post by:
Hi everyone, I am searching for a python library for barcode recognition. We have developed a rather complex application for document tracking and document management in python/Zope, called...
7
by: Alper Ozgur | last post by:
Hi; How can i capture and decode the barcode that reading by an usb Barcode reader?
4
by: Joe | last post by:
is there any free barcode reader in vb8 for code-128 ??
7
by: jim | last post by:
I need to have 2 simple barcode reader applications finished by midnight tonight. I have never written any barcode reader software and need any help that you may be able to offer. I do not know...
1
by: bojkar | last post by:
Hello everyone. I have quastion :) I have metrologic Eclipse MS5145 bar code reader in usb. Now I want read barcode from him. I'd searched metrologic homepage, a lot's of forums and search engines...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.