求高手指点下我这个程序哪里有问题?
我是新手,初次了解怎么通过VB编写串口通讯,按照书本上写了下面的这个程序,可是接收不了数据,通过串口调试助手可以发送,也可以接受,我想问下到底是哪个地方的问题?Private Sub Form_Load()
Comm1.PortOpen = True
End Sub
Private Sub Command1_Click()
Comm1.Output = txtSend.Text
End Sub
Private Sub Command2_Click()
Dim buf$
buf = Trim(Comm1.Input)
If Len(buf) < 0 Then
txtReceive.Text = "empty"
Else
txtReceive.Text = Comm1.Input
End If
End Sub
Private Sub Command3_Click()
Comm1.PortOpen = False
End
End Sub