Private Sub mscomm1_oncomm() 'oncomm事件处理程序 Select Case MSComm1.CommEvent Case comEvReceive
a = MSComm1.InBufferCount
receive = MSComm1.Input a = Asc(receive) r20(zz) = a zz = zz + 1 If zz = 20 Then '如果已经达到数据,则置位结束 over = 1 zz = 0 flag = 0 over = 0 End If 'Text6.Text = receive Case Else End Select
End Sub
在接收时加了句 a = MSComm1.InBufferCount,发送20个十六进制数据,MSComm1.InBufferCount显示有20个数据,但为什么a中始终为8???
还有我看MSComm1.Input中已经有一串数据了,我怎么能把这串数据变成20个十六进制数据(就是怎么把他们拆分)写在一个数组中???
问题有点浅,不好意思.
|