views:

267

answers:

2

Hi All,

I have a barcode scanner(Symbol-ls2208) but i dont know how to read information from it to my application (in C#). Can anyone help me in this problem with sample code?

Os: Windows XP. scanner: Symbol LS2208 General Purpose Bar Code Scanner

Geetha.

A: 

You will probably need some kind of driver-interaction module. Have you been given a .NET assembly or other interfacing component? Once you have some sort of interfacing component, the solution is usually to look in the documentation for it, and connect up your software as required...

Carlos
+3  A: 

What type of barcode scanner do you have? Usually those scanners work with a keyboard wedge, meaning they will literally 'type' the characters the scanner reads through the keyboard handling system of your OS. In that case, you don't have to do anything special to get the information.

If that is not the case, you should supply some more information. What kind of scanner, and with what sort of connection? What OS are you using?

Edit:

Well according to Symbol's information about the LS2208, it has the following connection methods:

Interfaces supported: IBM, Keyboard wedge, RS-232, Synapse, USB, Wand

It is a very simple model, and I think it does not have any memory so it will always send the barcode directly to the connected computer.

What interface do you use, and have you actually tested scanning with the device? Just open a text editor and scan something. The barcode should appear on your screen. With the supplied manual you can make it add a LF after the code. So you will be able to use a TextBox in your application and check for the Enter-key.

Edit2:

A small code sample. Add a TextBox called TextBox1 to your form and add the following event handler to it:

private void TextBox1_KeyDown(object sender, KeyEventArgs e)
{
    if (e.KeyCode == Keys.Enter)
    {
        // Do your thing with the supplied barcode! 
        e.Handled = true;
    }
}

You will need to configure the scanner to supply a line feed/carriage return after a scan for this to work.

Edit3:

To configure the scanner you really need to check the supplied information. I found a Quick Reference Guide, and even a configuration utility to do so. You should be able to figure it out using those two. Since I do not own a LS2208, I can't help you any further than that I think.

Okay perhaps a link to the general support download page for the LS2208. Does this link work?

Cloud
Added another link, does that one work? Otherwise just visit the product page of the Symbol LS2208 and go to the support/manuals section.
Cloud