绝对可以编译使用 串口通讯类: using System; using System.Runtime.InteropServices; namespace JustinIO { class CommPort { public string PortNum; public int BaudRate; public byte ByteSize; public byte Parity; // 0-4=no,odd,even,mark,space public byte StopBits; // 0,
Private Sub clear_receivetext_Click() receivetext.Text = "" End Sub Private Sub clear_sendtext_Click() sendtext.Text = "" End Sub Private Sub close_Click() MSComm1.PortOpen = False '关闭串口 End Sub Private Sub Form_Load() MSComm1.CommPort = 4 '使用串行端口1