473,387 Members | 1,379 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,387 software developers and data experts.

Read Barcode

I Guys :
I am working on a Application to read barcodes from a scanner and
list them in a ListBox on a web page. I was wondering if any one has
done a similar job.

Currently I have attached the scanner to my PC and as I scan a barcode
it reads and puts it on a notepad or textbox.
But I need to have control over the barcode and put it in the listbox.

Any ideas or code will be really appreciated.

Thanks
Nov 16 '05 #1
9 9028
Does the barcode device send any special characters first? I don't remember
off the top of my head, but I could've sworn with a credit card scanner
(type device) - it sends like \0x10 and something else first, and then sends
it's character string..

If that's the case, you could capture an event on the form, and when you see
those codes come across - set focus to your text box. ?

Aside from that, if it's just raw characters - I might force the user a
little bit - by say forcing the window on top and forcing the textbox to be
focused until they are "Done" adding items???
"Mudasir Ahmed" <mu***********@yahoo.com> wrote in message
news:b9**************************@posting.google.c om...
I Guys :
I am working on a Application to read barcodes from a scanner and
list them in a ListBox on a web page. I was wondering if any one has
done a similar job.

Currently I have attached the scanner to my PC and as I scan a barcode
it reads and puts it on a notepad or textbox.
But I need to have control over the barcode and put it in the listbox.

Any ideas or code will be really appreciated.

Thanks

Nov 16 '05 #2
Hi Guys :
I am working on a Application to read barcodes from a scanner and list
them in a ListBox on a web page. I was wondering if any one has done a
similar job. Is this possible ?

Currently I have attached the scanner to my PC and as I scan a barcode
it reads and puts it on a notepad or textbox.
But I need to have control over the barcode and put it in the listbox.
In other words I want to perform some validation before putting into the
list box.
Secondly under what event can I capture the value in the texbox on the
webpage ?
The user must not tab or click on the page. He wil just keep scanning
barcodes on after the other on the page. Peep Peep Peep.

Any ideas or code will be really appreciated.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
Is the barcode reader using a keyboard wedge or serial interface? If it's
using a keyboard wedge, you need to force the form focus to an editable
control, such as a TextBox, then you can use the TextChanged event to tell
when the scanner enters a new scanned code. If it's a serial interface, you
can just monitor the serial port for the packet data coming from the device.
There are several serial components, free and commercial. I've used several
of the free ones, but I'm using TransPort from www.componentscience.com now
to read barcodes from a scanner.

--
Floyd Burger

"Mudasir Ahmed" <mu***********@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Guys :
I am working on a Application to read barcodes from a scanner and list
them in a ListBox on a web page. I was wondering if any one has done a
similar job. Is this possible ?

Currently I have attached the scanner to my PC and as I scan a barcode
it reads and puts it on a notepad or textbox.
But I need to have control over the barcode and put it in the listbox.
In other words I want to perform some validation before putting into the
list box.
Secondly under what event can I capture the value in the texbox on the
webpage ?
The user must not tab or click on the page. He wil just keep scanning
barcodes on after the other on the page. Peep Peep Peep.

Any ideas or code will be really appreciated.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4
Hi Floyd
Thanks for the reply. I am using Keyboard Wedge. That is how its been
setup in the labs.
The TextChange event does not fire until the user navigates or sets a
new focus to other object on the form.
So I dont know how to capture the data after the user scans it.

Please help me.

Thank you

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
The keyboard wedge behaves just like a keyboard, when it scans something it
sends the scanned code as text, just like a regular keyboard would, to the
control that has focus. As long as your control has focus it will get a
TextChanged event when the scanner sends the data. You might be having some
focus problems, have you tried just a simple form with a TextBox and
ListBox? Something like this will show you what's happening:

private void textBox1_TextChanged(object sender, System.EventArgs e)
{
listBox1.Items.Add( string.Format( "TextChanged \"{0}\"",
textBox1.Text ) );
}

The only thing that might be difficult is determining the end of the scan.
In my test, I got a TextChanged for each char in the scan, so you'd want to
do some validation of the data to only add the code to your list when it is
a complete code.
--
Floyd Burger

"Mudasir Ahmed" <mu***********@yahoo.com> wrote in message
news:O0****************@TK2MSFTNGP12.phx.gbl...
Hi Floyd
Thanks for the reply. I am using Keyboard Wedge. That is how its been
setup in the labs.
The TextChange event does not fire until the user navigates or sets a
new focus to other object on the form.
So I dont know how to capture the data after the user scans it.

Please help me.

Thank you

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #6
Foyd ,

TextChanged event fires for each letter (for instance if the barcode
is 'J12394834AD' then it executes for each letter and all the letters in
the listbox.

Do you have code which just collects it into a string array and puts it
in the listbox.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #7
Nope, don't have any code like that. The keyboard wedge makes the scanner
insert keycodes into the standard keyboard buffers, so it behaves just like
an external keyboard (without the keys of course). The string array is the
text of the control that has the focus. As far as Windows and your
application are concerned, scanning a barcode with your wedge is exactly
like someone typing the code into the keyboard. Whichever control has focus
will receive the code.

--
Floyd Burger

"Mudasir Ahmed" <mu***********@yahoo.com> wrote in message
news:Oz*************@TK2MSFTNGP12.phx.gbl...
Foyd ,

TextChanged event fires for each letter (for instance if the barcode
is 'J12394834AD' then it executes for each letter and all the letters in
the listbox.

Do you have code which just collects it into a string array and puts it
in the listbox.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #8
Foyd ,

Also can I automatically fire an event on a ASP page.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #9
sorry, I don't know anything about ASP

--
Floyd Burger

"Mudasir Ahmed" <mu***********@yahoo.com> wrote in message
news:eh**************@TK2MSFTNGP09.phx.gbl...
Foyd ,

Also can I automatically fire an event on a ASP page.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #10

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

Similar topics

9
by: Krishna Sagiraju | last post by:
Hai, I gotta decode a barcode from an image ( ppm, bmp, or jpg). I realize the first milestone would be to recognize a barcode with in the image: I took a small window (say 80X80 pixels) and if...
9
by: Mudasir Ahmed | last post by:
I Guys : I am working on a Application to read barcodes from a scanner and list them in a ListBox on a web page. I was wondering if any one has done a similar job. Currently I have attached the...
4
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...
1
by: Aaron Bronow | last post by:
I have an asp.net application which loads a Crystal Reports ReportDocument, passes in parameters for selecting data from the report's database connection, renders the report for previewing on the...
1
by: paridaG | last post by:
hi, Please tell me,how to read data from a barcode reader using C++. My OS is (ubuntu)Linux?. I have connected my barcode scanner in com1(dev/ttyS0) and I am using minicom for communication.I am...
1
by: charanmanju | last post by:
I am working in VC++ 6.0, i want to read barcode, its probably linear barcode from an image, i didn't have an idea how to start, please help me with ur ideas
7
by: Alper Ozgur | last post by:
Hi; How can i capture and decode the barcode that reading by an usb Barcode reader?
2
by: nmrpa91290 | last post by:
Hi, I am in the design phase of building a database that will track the productivity of my warehouse. I am thinking of using a barcode scanner to assist me with this. Employees will hopefully...
3
by: suresh_nsnguys | last post by:
Hi guys, i am planning to create 1 barcode that will display in both PC and also mobile phone.i tried out using code-39 using php .but its not getting fit in mobile screen , the user...
7
by: divyac | last post by:
I am doing an inventory control project and i want to create barcodes for the products in addition to the product details in a form.The form values should be submitted to the database to retrieve for...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.