问题描述
大家好,
我是视觉VB的新手,我正在尝试与外界建立通信。
。我找到了下面在
Microsoft Visual Basic 2005 Express Edition的帮助部分中列出的示例。使用超级终端
应该能够看到字符串Hello还是我完全离开了基地
?提前感谢所有人和任何帮助。
祝你好运,Ken
Sub SendSerialData(ByVal data As String)
''将字符串发送到串口。
使用com1作为IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort(" COM1")
com1.WriteLine(" Hello")
结束使用
End Sub
Hello everyone,
I''m new to visual VB and I am trying to setup communications to the
outside world. I found the example listed below in the help section of
Microsoft Visual Basic 2005 Express Edition. Using the Hyper Terminal
should I be able to see the string "Hello" or am I completely off base
here? Thank you in advance for all and any help.
Best regards, Ken
Sub SendSerialData(ByVal data As String)
'' Send strings to a serial port.
Using com1 As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort("COM1")
com1.WriteLine("Hello")
End Using
End Sub
推荐答案
这篇关于纽伯帮忙。发送串行数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!