Thursday, August 6, 2009

Activity 2




Code:

'Author: Yul Bryan B. Bringuer
'Cell #: 09236198230
'Address: Lapu-Lapu Ext., Digos City
'Course: BSIT

Dim RGBValue As Integer

Private Sub mnuAuthor_Click()
frmAuthor.Show

End Sub

Private Sub mnuBlue_Click()
FrmLucky7.BackColor = RGB(10, 10, 150)
End Sub

Private Sub mnuClose_Click()
Unload Me
End Sub

Private Sub mnuGreen_Click()
FrmLucky7.BackColor = RGB(10, 150, 10)
End Sub

Private Sub mnuOrange_Click()
FrmLucky7.BackColor = RGB(255, 121, 0)
End Sub

Private Sub mnuPink_Click()
FrmLucky7.BackColor = RGB(255, 201, 255)
End Sub

Private Sub mnuRed_Click()
FrmLucky7.BackColor = RGB(255, 0, 0)
End Sub

Private Sub mnuViolet_Click()
FrmLucky7.BackColor = RGB(99, 0, 86)
End Sub

Private Sub mnuYellow_Click()
FrmLucky7.BackColor = RGB(255, 255, 0)
End Sub
Private Sub cmdwin_Click()
Timer1.Enabled = True
Timer1.Interval = 100

Timer1_Timer
Me.cmdwin.Visible = False
CommandButton1.Visible = True

End Sub

Private Sub cmdend_Click()
Unload Me
End Sub

Private Sub CommandButton1_Click()
Me.CommandButton1.Visible = False
Me.Timer1.Enabled = False
Me.Timer1.Interval = 0

Me.cmdwin.Visible = True

If Me.lblone.Caption = "7" Or Me.lbltwo.Caption = "7" Or Me.lblthree.Caption = "7" Then
Me.Coins.Visible = True
Me.Label2.Caption = Me.Label2.Caption + 1
Beep
Else
Me.Label3.Caption = Me.Label3.Caption + 1

End If

End Sub

Private Sub Timer1_Timer()
Coins.Visible = False

lblone.Caption = Int(Rnd * 10)
lbltwo.Caption = Int(Rnd * 10)
lblthree.Caption = Int(Rnd * 10)

End Sub

No comments:

Post a Comment