我想写个小程序,将用户从键盘输入的东西送到串行端口,并在指定的文本框中显示出来,怎么弄啊、帮我看下,(*^__^*) 嘻嘻……
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim Buffer As Variant
MSComm1.CommPort = 1
MSComm1.PortOpen = True
Buffer = Chr$(KeyAscii)
MSComm1.Output = Buffer
End Sub
Private Sub Form_Load()  MSComm1.CommPort = 1
  MSComm1.Settings = "9600,n,8,1"
  MSComm1.OutBufferCount = 0
  MSComm1.InBufferCount = 0
  MSComm1.InputLen = 0
  MSComm1.InputMode = comInputModeBinary
  MSComm1.NullDiscard = False
  MSComm1.RThreshold = 1
  
End Sub