将激光扫描仪连接到visual basic.net项目 [英] Connecting laser scanner to visual basic.net project
问题描述
我需要从掌上扫描仪获取输入,我不知道该怎么做,请帮助我。我非常高兴和感谢将要提供的任何aswer
I need to get input from the handheld scanner and I don't know what to do, please help me. I im very pleased and thankful to any aswer that will be provided
这是我尝试过的事情
Imports System.Net.Sockets
Imports System.Net.Sockets
Public Class Form1
Public Class Form1
Private Sub AxBarcode1_TypeChange(sender as Object,e As AxBARCODELib._DBarcodeEvents_TypeChangeEvent)
Private Sub AxBarcode1_TypeChange(sender As Object, e As AxBARCODELib._DBarcodeEvents_TypeChangeEvent)
结束次
End Sub
Private Sub TextBox1_TextChanged(sender As Object,e As EventArgs)处理TextBox1.TextChanged
AxBarcode1.Text = TextBox1.Text
结束次
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
AxBarcode1.Text = TextBox1.Text
End Sub
Private Sub Timer1_Tick(发件人为对象,e为EventArgs)处理Timer1.Tick
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim Number As Integer = CInt(TextBox1.Text)+ 1
TextBox1.Text =数字
尝试
暗淡的范围作为TcpClient的=新的TcpClient(QUOT; 127.0.0.1" ;, TextBox1.Text)
           如果range.Connected = True则为
ListBox1.Items.Add(TextBox1.Text&安培;"是开放")
           结束如果
C ex ex As Exception
ListBox1.Items.Add(TextBox1.Text&"已关闭")
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
结束尝试
Dim Number As Integer = CInt(TextBox1.Text) + 1
TextBox1.Text = Number
Try
Dim range As TcpClient = New TcpClient("127.0.0.1", TextBox1.Text)
If range.Connected = True Then
ListBox1.Items.Add(TextBox1.Text & "is open")
End If
Catch ex As Exception
ListBox1.Items.Add(TextBox1.Text & "is closed")
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
End Try
结束次
End Sub
Private Sub Button1_Click(发件人为对象,e为EventArgs)处理Button1.Click
Timer1.Enabled = True
结束次
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(发件人为对象,e为EventArgs)处理Button2.Click
Timer1.Enabled = False
结束点¥
结束类
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
End Class
推荐答案
我首先修改问题:
I'd start by revising the question:
我需要从掌上扫描仪获取输入(制作:______________,型号#:_________________)
I need to get input from the handheld scanner (Make:______________, Model #:_________________)
他们的网站是http://www.________________.com
Their website is http://www.________________.com
这篇关于将激光扫描仪连接到visual basic.net项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!