Private Sub Command1_Click()
a = Option1
b = Option2
c = Option3
If a = True Then
a = vbRed
End If
If b = True Then
b = vbGreen
End If
If c = True Then
c = vbBlue
End If
If Label3.BackColor = a Then
Timer1.Enabled = False
Label4.Visible = False
Label5.Visible = False
ElseIf Label4.BackColor = b Then
Timer2.Enabled = False
Label5.Visible = False
Label3.Visible = False
ElseIf Label5.BackColor = c Then
Timer3.Enabled = False
Label3.Visible = False
Label4.Visible = False
Else: MsgBox "Anda Kurang beruntung", 0, "coba lagi"
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
End If
If Timer1.Enabled = False Or Timer2.Enabled = False Or Timer3.Enabled = False Then
MsgBox "Jakpot", 0, "Selamat"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
End Sub
Private Sub Form_Load()
Shape1.FillColor = vbRed
Shape1.FillStyle = 0
Shape2.FillColor = vbGreen
Shape2.FillStyle = 0
Shape3.FillColor = vbBlue
Shape3.FillStyle = 0
Command1.Caption = "Oke"
Command2.Caption = "End"
Command3.Caption = "Coba Lagi"
End Sub
Private Sub Timer1_Timer()
warna = Int((Rnd) * 3)
If warna = 1 Then
Label3.BackColor = vbRed
ElseIf warna = 2 Then
Label3.BackColor = vbGreen
Else: Label4.BackColor = vbBlue
End If
End Sub
Private Sub Timer2_Timer()
warna = Int((Rnd) * 3)
If warna = 1 Then
Label4.BackColor = vbRed
ElseIf warna = 2 Then
Label4.BackColor = vbGreen
Else: Label4.BackColor = vbBlue
End If
End Sub
Private Sub Timer3_Timer()
warna = Int((Rnd) * 3)
If warna = 1 Then
Label5.BackColor = vbRed
ElseIf warna = 2 Then
Label5.BackColor = vbGreen
Else: Label5.BackColor = vbBlue
End If
End Sub
0 comments:
Post a Comment