Informatics Forum

Program Buat Barcode scanner

Posted on: December 27, 2008

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

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

Pages

Blog Stats

  • 131,473 hits

Category

Online

visitor stats
December 2008
M T W T F S S
« Nov   Jan »
1234567
891011121314
15161718192021
22232425262728
293031  
%d bloggers like this: