- Home
·
- Graphics
·
- Name of program is Stop & Go Lights. This code will turn on and off timers that also will make thre
Name of program is Stop & Go Lights. This code will turn on and off timers that also will make thre
Name of program is Stop & Go Lights. This code will turn on and off timers that also will make three different images visible true or false,
Rate Name of program is Stop & Go Lights. This code will turn on and off timers that also will make thre
(1(1 Vote))
tmrRedLight.Enabled = True
End Sub
Private Sub tmrRedLight_Timer()
'Red light code.
If imgRedLight.Visible = False Then
imgRedLight.Visible = True
tmrYellowLight.Enabled = False
tmrGreenLight.Enabled = False
lblRed.Visible = True
lblYellow.Visible = False
lblGreen.Visible = False
Else
If imgRedLight.Visible = True Then
imgRedLight.Visible = False
tmrRedLight.Enabled = False
tmrYellowLight.Enabled = True
tmrGreenLight.Enabled = False
lblRed.Visible = False
lblYellow.Visible = False
lblGreen.Visible = False
End If
End If
End Sub
Private Sub tmrYellowLight_Timer()
'Yellow light code.
If imgYellowLight.Visible = False Then
imgYellowLight.Visible = True
tmrRedLight.Enabled = False
tmrGreenLight.Enabled = False
lblRed.Visible = False
lblYellow.Visible = True
lblGreen.Visible = False
Else
If imgYellowLight.Visible = True Then
imgYellowLight.Visible = False
tmrRedLight.Enabled = False
tmrYellowLight.Enabled = False
tmrGreenLight.Enabled = True
lblRed.Visible = False
lblYellow.Visible = False
lblGreen.Visible = False
End If
End If
End Sub
Private Sub tmrGreenLight_Timer()
'Green light code.
If imgGreenLight.Visible = False Then
imgGreenLight.Visible = True
tmrRedLight.Enabled = False
tmrYellowLight.Enabled = False
tmrGreenLight.Enabled = True
lblRed.Visible = False
lblYellow.Visible = False
lblGreen.Visible = True
Else
If imgGreenLight.Visible = True Then
imgGreenLight.Visible = False
tmrRedLight.Enabled = True
tmrYellowLight.Enabled = False
tmrGreenLight.Enabled = False
lblRed.Visible = False
lblYellow.Visible = False
lblGreen.Visible = False
End If
End If
End Sub
Private Sub cmdStop_Click()
tmrRedLight.Enabled = False
tmrYellowLight.Enabled = False
tmrGreenLight.Enabled = False
imgRedLight.Visible = False
imgYellowLight.Visible = False
imgGreenLight.Visible = False
lblRed.Visible = False
lblYellow.Visible = False
lblGreen.Visible = False
End Sub
Private Sub cmdExit_Click()
End
End Sub
Name of program is Stop & Go Lights. This code will turn on and off timers that also will make thre Comments
No comments yet — be the first to post one!
Post a Comment