如何使用扫描仪C#.NET应用程序 [英] How to use scanner in c#.net application

查看:411
本文介绍了如何使用扫描仪C#.NET应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个酒吧code扫描仪(符号-LS2208),但我不知道如何从中读取信息到我的应用程序(在C#)。谁能帮我在这个问题上与样品code?

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?

操作系统:Windows XP。
扫描仪:符号LS2208通用酒吧code扫描仪

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

Geetha。

推荐答案

你有什么类型的酒吧code扫描仪?通常这些扫描仪具有键盘仿真工作,这意味着他们将字面上类型扫描仪通过你的操作系统的键盘处理系统读取字符。在这种情况下,你不需要做什么特别的得到的信息。

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?

修改

那么根据符号的有关LS2208的信息,它具有以下连接方式:

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

支持的接口:IBM,键盘
  楔形,RS-232,突触,USB棒

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

这是一个非常简单的模型,我认为它没有任何记忆,因此总是会送的吧code直接连接的计算机。

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.

你用什么接口,你实际上是与设备测试扫描?只需打开一个文本编辑器和扫描的东西。酒吧code应该出现在屏幕上。使用随机提供的手册,可以将其作为code后添加LF。所以,你就可以在你的应用程序中使用一个文本框和检查回车键。

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

一个小code样品。一个名为TextBox1的文本框添加到您的窗体和下面的事件处理程序添加到它:

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

要配置你真的需要检查提供的信息扫描仪。我发现了一个<一个href=\"http://support.symbol.com/support/search.do?cmd=displayKC&docType=kc&externalId=7188201cpdf&sliceId=&dialogID=176444618&stateId=1%200%20176438376\"相对=nofollow>快速参考指南,甚至是配置实用程序这样做。您应该能够使用这两个要弄明白。由于我没有自己的LS2208,我帮不了你任何进一步的比我想的。

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.

好吧也许普遍支持下载页面的链接为LS2208。是否<一个href=\"http://support.symbol.com/support/browse.do?WidgetName=BROWSE_PRODUCT&TaxoName=SG_SupportGoals&BROWSE_PRODUCT.isProductTaxonomy=true&BROWSE_PRODUCT.NodeId=SG_LS_2208_1_2&BROWSE_PRODUCT.thisPageUrl=%2Fproduct%2Fproducts.do&id=m4&BROWSE_PRODUCT.TaxoName=SG_SupportGoals&NodeType=leaf&NodeName=LS2208&document=DT_PRODUCTMANUALS_1_1&BROWSE_PRODUCT.NodeType=leaf&NodeId=SG_LS_2208_1_2&AppContext=AC_ProductPage&param_document=sp%20&localeId=33\"相对=nofollow>此链接工作?

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

这篇关于如何使用扫描仪C#.NET应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆