863
社区成员
发帖
与我相关
我的任务
分享
Output 属性示例
下面的例子说明如何将用户键入的每一个字符送到串行端口:
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