String形式的私有strData
私有子命令1_Click()'發送
MSComm1。Output = "123456 "
末端接頭
私有子窗體_Load()
MSComm1。Settings = "9600,N,8,1 "
Mscomm1。“rthreshold = 1”觸發ONCOMM事件。
MSComm1。PortOpen = True
MSComm1。“輸入模式= CominputModeText”ASCII接收
Text1 = " "
末端接頭
私有Sub MSComm 1 _ on com()
選擇案例摘要。MSComm1。CommEvent
案件受理
strData = Mscomm1。投入
0 = text 1 & amp;strData
結束選擇
末端接頭