从相同窗口形式的两个条形码阅读器中读取 [英] Read from two barcode reader in same windows form

查看:76
本文介绍了从相同窗口形式的两个条形码阅读器中读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我创建了我从条形码阅读器中读取的Windows窗体应用程序,在文本框中填写条形码1

现在我尝试在同一窗口形式连接另一个条形码阅读器,我想要填写阅读文本框2

无需用户移动光标

我的意思是我希望如果有任何方法可以同时从两个条形码中读取相同的表格不同的文本框



我尝试了什么:



我尝试连接一个条形码阅读器并在表格中设置默认工具textbox1并从条形码中读取并填写文本框

Hi I create my windows form application that i read from barcode reader , fill barcode in textbox1
Now i try to connect another barcode reader at same windows form , and i want to fill read in textbox2
With no need to move the curser by user
I mean i wish if there are any way to read from two barcode at same time in same form with different textbox

What I have tried:

I try to connect one barcode reader and set the default tool textbox1 in form and read from barcode and fill in text box

推荐答案

基本上,我们无法帮助。

出厂时大多数条形码扫描仪都设置为模拟键盘,并直接输入条形码数据,就像用户输入的那样 - 无法判断数据何时到达应用程序的来源,因此您可以不要把它指向一个盒子或另一个盒子。



但是,它通常是可能的e配置它们以提供引入和尾随字符或序列,您可以使用这些字符或序列来识别将要传输的数据及其来源。

坏消息是你如何做这取决于制造商(有时也取决于模型)。您必须联系构建扫描仪的人员,并向他们询问相关信息 - 我们无法提供!
Basically, we can't help.
Most barcode scanners when shipped are setup to emulate a keyboard, and feed the barcode data directly as if the user had typed it - there is no way to tell when the data arrives at your application where it came from, so you can't direct it to one box or the other.

However, it is normally possible to configure them to provide "Lead in" and "Trailing" characters or sequences which you can use to identify what data is coming, and where it came from.
The bad news is that how you do that depends on the manufacturer (and sometimes the model as well). You will have to contact the people who built your scanner, and ask them for the information - we can't provide it!


如果您打算使用多个条形码阅读器一台机器他们最好是基于以太网而不是键盘楔设备。



为什么? 键盘楔形设备键入它们扫描的代码,就像它们是键盘而不是扫描仪一样。虽然可以对其中的一些进行编程,以便使用唯一的键序列预先发送它们发送的代码,这样您就可以知道代码来自哪个扫描程序。更大的问题是如果你在同一时间扫描两个代码怎么办?两个扫描仪都会尝试同时输入,你会得到一堆垃圾而不是扫描仪的两个不同代码。
If you're going to use more than one barcode reader on a single machine they better be Ethernet based and not "keyboard wedge" devices.

Why? "Keyboard wedge" devices "type" the code they scan as if they were a keyboard not a scanner. While it is possible to program some of these to pre-pend the code they send with a unique key sequence so you can tell which scanner the code came from. The bigger problem is what if you scan two codes at the exact same time? Both scanners will try to type at the same time and you're going to get a pile of garbage instead of two different codes from the scanners.


这篇关于从相同窗口形式的两个条形码阅读器中读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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