条码扫描器处理程序

时间:2014-04-02 20:16:24

标签: vb.net barcode zxing barcode-scanner

我正在处理条形码,我需要一些帮助

VB.NET中是否存在某些类型的条形码扫描器事件或处理程序(可能类似onScanFinished)?

我不想使用文本框,但它对我不起作用。

我需要它来向我显示MsgBox中的扫描结果。这可能吗?

1 个答案:

答案 0 :(得分:0)

我解决了它

Public Class Form1
Dim aaa As String = ""
Private Sub Form1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
    If e.KeyCode = Keys.SpaceThen 'or the character that comes at the end of the scanned barcode
        MsgBox(aaa)
    End If
End Sub
Private Sub Form1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
    aaa = aaa & e.KeyChar.ToString
    e.Handled = True
End Sub

结束班