Global rx_data$
Global tx_comm$
Global in_set
Global alarm
‘*****************************************************************
Private Sub Check1_click(Index As Integer)
in_set = 1
If Check1(0).Value = 1 Then n = 49 Else n = 48
If Check1(1).Value = 1 Then n = n + 2
If Check1(2).Value = 1 Then n = n + 4
If Check1(3).Value = 1 Then n = n + 8
MSComm1.Output = "3"
MSComm1.Output = Chr$(n)
rx_data$ = MSComm1.Input
in_set = 0
End Sub
‘*****************************************************************
Private Sub end_Command1_Click()
End
End Sub
‘*****************************************************************
Private Sub Form_Load()
MSComm1.PortOpen = True
tx_comm$ = "1"
in_set = 0
End Sub
‘*****************************************************************
Private Sub set_time_Click()
Label2.Caption = "传送时间"
in_set = 1
MSComm1.Output = "4"
t$ = Time$
MSComm1.Output = Mid$(t$, 1, 1)
MSComm1.Output = Mid$(t$, 2, 1)
MSComm1.Output = Mid$(t$, 4, 1)
MSComm1.Output = Mid$(t$, 5, 1)
Do
Loop While MSComm1.InBufferCount = 0
rx_data$ = MSComm1.Input
in_set = 0
End Sub
‘*****************************************************************
Private Sub Timer1_Timer()
time_box.Caption = Time$
If sen(0).BackColor = QBColor(12) Then
Beep
ElseIf sen(1).BackColor = QBColor(12) Then
Beep
ElseIf sen(2).BackColor = QBColor(12) Then
Beep
ElseIf sen(3).BackColor = QBColor(12) Then
Beep
End If
End Sub
‘*****************************************************************
Private Sub Timer2_Timer()
If in_set = 0 Then
If MSCo ..
访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容