阅读从手持式扫描仪或酒吧code读者人数在C#扫描仪、手持式、人数、读者

2023-09-04 05:59:04 作者:我的天空失去了颜色i

谁做了相关的事了一些工作任何机构可以告诉我怎样才能做到这一点?

Can any body who did some work on related thing tell me how can I achieve this?

我想实现的是从扫描仪读取数(印刷在我的框),并把这个数字在数据库中。这些数字可以是产品ID。我需要知道

What I want to achieve is to read number (printing on my boxes) from scanner and put that number in database. The numbers can be product IDs. What I need to know

从哪里开始 什么是手持式扫描仪的类型可我选择了这个 我可以读取这些数字用C#太ADN哪些类支持呢? 在任何教程可用?

推荐答案

这里广泛地解释:的如何阅读从酒吧code读卡器一个价值?的酒吧code读卡器/扫描(或并口,串口或USB连接)通常是被视为从计算机键盘,这种情况发生在设备驱动程序级别,你有什么做一下,在你的C#code。

As extensively explained here: How to read a value from a barcode reader? a barcode reader/scanner (either parallel, serial or USB connected) is normally seen as a keyboard from the computer, this happens at the device driver level, you have nothing to do about that in your C# code.

其实你也应该支持的code手动输入(字母数字),如收银员确实在超市,当你把一个项目与读取(扫描仪)条code。

In fact you should also support manual entry of the code ( alpha-numeric ), like the cashier does in the supermarket when you took an item with unreadable (by the scanner) barcode.

在C#应用程序中有一个文本框,用户可以使用键盘输入code和当焦点在该文本框,用户扫描code与读者,你不会注意到有什么区别输入从正常键盘或读取器来了...除了没有差异在某些情况下,杆code读者还将包括CR(ENTER)在的code中的端部,并可以用它来开始你的下一个动作,如数据库操作等。

in your C# application have a textbox where the user can type the code using the keyboard and when focus is on that textbox and the user scans a code with the reader you won't notice any difference between the input coming from the normal keyboard or the reader... no differences except that in some cases the barcode reader will also include a CR ( ENTER ) at the end of the code and you can use that to initiate your next action, like database operation etc.

我觉得你其实可以配置,如果你想在CR后,每发送给你读与否,在某个设备的驱动程序设置,它可能取决于具体的器件。

I think you can actually configure if you want the CR to be sent to you after each read or not, somewhere in the driver settings of the device, it might depend on the specific device.