Thursday, August 6, 2009

Activity II : Click To Win WIth Backgrounds.










Codes:

Dim RGBValue As Integer

Private Sub Image1_Click()

End

End Sub

Private Sub Image2_Click()

Coins.Visible = False

lbl1.Caption = Int(Rnd * 10)

lbl2.Caption = Int(Rnd * 10)

lbl3.Caption = Int(Rnd * 10)

If (lbl1.Caption = 7) Or (lbl2.Caption = 7) Or (lbl3.Caption = 7) Then

Coins.Visible = True

MsgBox "yOu wOn", vbInformation, "cOnGraTiOnz!..."

Beep

Else

MsgBox "bEtTer LucK nExt tiMe", vbExclamation, "tRy agAin..."

End If

End Sub

Private Sub mnuAuthor_Click()

frmauthor.Show

frmlucky7.Hide

End Sub

Private Sub mnuBlue_Click()

frmlucky7.BackColor = RGB(10, 10, 150)

End Sub

Private Sub mnuClose_Click()

End

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


Code For Author:

Private Sub Image2_Click()

End

End Sub

Private Sub Label4_Click()

frmlucky7.Show

Me.Hide

End Sub





No comments:

Post a Comment