VB程序:编写程序,能够模拟交通信号灯的切换
发布网友
发布时间:2022-05-15 13:20
我来回答
共1个回答
热心网友
时间:2023-10-25 00:19
Private Sub Form_Load()
Timer1.Interval = 60000
Timer2.Interval = 60000
End SubPrivate Sub Timer1_Timer()
Me.BackColor = RGB(0, 255, 0)
Timer2.Enabled = True
Timer1.Enabled = False
End SubPrivate Sub Timer2_Timer()
Me.BackColor = RGB(255, 0, 0)
Timer1.Enabled = True
Timer2.Enabled = False
End Sub