Vb.net中的商品扫描仪Windows窗体应用程序 [英] Goods Scanner in Vb.net Windows form Application

查看:149
本文介绍了Vb.net中的商品扫描仪Windows窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



有人能指出我如何在VB.Net中为商品扫描仪开发Windows窗体应用程序吗?



我希望用扫描仪扫描物品,它应该读取条形码或价格?



我读过它可能是在网上用VB.Net开发的。但是有没有特定的条形码或价格阅读器扫描仪,我可以与任何特定的编码指令一起在VB.Net中开发应用程序?



请协助我希望为贸易商店开发一个小型应用程序。将使用单个扫描仪,因为它将有一个收银员。



提前感谢您。

解决方案

< blockquote>你知道你正在使用哪种设备吗?



布莱斯


通常条码扫描器连接到串口,无论是物理的还是虚拟的,或者它们都可以用作键盘(HID)。



如果您选择通过串口进行通信的那个,则需要查看 Serialport class [ ^ ]

使用串口的好处是可以更容易地将扫描数据导入接收控件,例如 TextBox ,无论如何控制是否有焦点的情况。



如果扫描仪模拟一个键这是很容易上手。

只需将焦点放在应该接收扫描数据和扫描的控件上。

然后使用 TextChanged 处理数据的事件。

挑战是你需要确保焦点在正确的控制上。

如果你有运行这个的多个应用程序可能有点棘手。



有很多方法,但它更高级。

参考这些文章:

.NET中的全局系统挂钩 [ ^ ]

使用来自C#的原始输入处理多个键盘 [ ^ ]



它们是为c#编写的,但应该可以应用于VB .net以及。


Hello,

Can anyone point me to the right direction as to how I can develope a Windows Form Applicaion in VB.Net for a goods scanner?

I wish to use a scanner to scan the item, it should probably read the bar code or price?

I have read about it being possibly developed in VB.Net on the net. But is there any specific bar code or price reader scanner that I can get together with any specific coding instruction to develope the application in VB.Net?

Please assist as I wish to develope a small application for a trade store. A single scanner will be used as it will have a single cashier.

Thanking you in advance.

解决方案

do you know which device you're using?

Bryce


Usually barcode scanners are connected to a serial port, either physical or virtual, or they function as a keyboard (HID).

If you select one that communicates over the serial port, you need to look into the Serialport class[^]
The advantage of using a serial port is that it is much easier to direct your scanned data into the receiving control, such as a TextBox, regardless of if the control has focus or not.

If the scanner emulates a keyboard, it is very easy to get started.
Just put focus to the control that should receive the scanned data and scan.
Then use the TextChanged event to process the data.
The challenge is that you need to make sure the focus is on the correct control.
If you have multiple applications running this can be a bit tricky.

There are ways around this, but it is a bit more advanced.
Refer to these articles:
Global System Hooks in .NET[^]
Using Raw Input from C# to handle multiple keyboards[^]

They are written for c#, but should be possible to apply to VB.net as well.


这篇关于Vb.net中的商品扫描仪Windows窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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