Nge-Blog ala Kang Yunan

Icon

Kehidupan, IT, Teknologi Informasi, Gosip, Film, Artis, Budi Anduk, Sosial, Komunitas, Pemerintahan, Rumah Tangga, Masyarakat, Kuliner, Makanan, New Idea, Sport, Olahraga, Liputan, Ulasan, Renungan, Agama, Islam

Program Buat Barcode scanner

Sedikit potongan program untuk membaca dan menulis menggunakan barcode scanner. Semoga membantu.

Private Sub Command1_Click()
On Error GoTo errHandler

‘FOR WRITING
MSComm1.CommPort = 2
MSComm1.Settings = “9600,N,8,1”
MSComm1.PortOpen = True
MSComm1.Output = “Testing” ‘txtData.Text
MsgBox MSComm1.OutBufferCount
MSComm1.PortOpen = False

‘FOR READING

MSComm1.CommPort = 2
MSComm1.Settings = “9600,N,8,1”
MSComm1.PortOpen = True
MsgBox MSComm1.InBufferCount
MSComm1.InputMode = comInputModeText
‘Text1.Text = MSComm1.Input
MsgBox MSComm1.Input
MSComm1.PortOpen = False

errHandler:
If Err.Number 0 Then
MsgBox “Error No: ” & Err.Number & “, Error Description: ” & Err.Description
End If
End Sub

Filed under: Software

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: