1,451
社区成员
发帖
与我相关
我的任务
分享
If Command2.Caption = "停止接收" Then '首先检查这里,字符串是否与命令按钮显示的相同
Select Case CommEvent
Case comEvReceive
temp = MSComm1.Input
If MSComm1.InputMode=comInputModeText Then
Text2 = StrConv(temp, vbUnicode)
Else
For i = LBound(temp) To UBound(temp)
Text2 = Text2 & IIf(Text2 = "", "", " ") & Right("0" & Hex(temp(i)), 2)
Next i
End If
End Select
End If