关于vb2005串口通讯的基本问题
我现在用vb.net作串口通讯,当接收完字节数组并让它像VB6.0一样显示在文本框里代码如下:
Dim i As Byte = 0
'Try
RevStr = ""
For i = 0 To UBound(ReByte)
If ReByte(i) > 15 Then
RevStr = RevStr & Hex(ReByte(i)) & " "
Else
RevStr = RevStr & "0" & Hex(ReByte(i)) & " "
End If
Next i
TxtRev.Text=TxtRev.Text & revstr & chr(13) & chr(10)
'Catch ex As Exception
'End Try
这样运行的时候会有错,请问各位前辈错在哪里?应该怎么修改呢?
还有我在自写的sub过程里让:cmb1.selectindex=cmb2.selectindex也有错,又应该怎么改呢?