Comm.CommPort = 1
On Error Resume Next
If Comm.PortOpen = False Then
Comm.PortOpen = True
If Comm.PortOpen = True Then
Comm.Settings = "4800,n,8,1"
Comm.InputMode = 1
Comm.InputLen = 0
Comm.InBufferSize = 1024
Comm.OutBufferSize = 512
Comm.SThreshold = 0
Comm.RThreshold = 1
Comm.InBufferCount = 0
Comm.OutBufferCount = 0
推荐看书
Visual_Basic与_RS-232_串行通信控制