Wednesday, August 5, 2009
EXERCISE NO: 1
Private Sub cmdwin_Click()
Coins.Visible = False
lblone.Caption = Int(Rnd * 10)
lbltwo.Caption = Int(Rnd * 10)
lblthree.Caption = Int(Rnd * 10)
If (lblone.Caption = 7) Or (lbltwo.Caption = 7) Or (lblthree.Caption = 7) Then
Coins.Visible = True
Beep
End If
End Sub
Private Sub cmdend_Click()
End
End Sub
EXERCISE NO: 2
Dim RGBValue As Integer
Private Sub cmd2_Click()
End
End Sub
Private Sub cmdClickMe_Click()
Coins.Visible = False
labelA.Caption = Int(Rnd * 10)
labelB.Caption = Int(Rnd * 10)
labelC.Caption = Int(Rnd * 10)
If (labelA.Caption = 7) Or (labelB.Caption = 7) Or (labelC.Caption = 7) Then
Coins.Visible = True
Beep
End If
End Sub
Private Sub mnuAuthor_Click()
frmAuthor.Show
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
EXERCISE 3
Private Sub VScrollone_Change()
Picture1.BackColor = RGB(VScrollone.Value, VScrolltwo.Value, VScrollthree.Value)
lblone.Caption = "Red: " & VScrollone.Value
End Sub
Private Sub VScrolltwo_Change()
Picture1.BackColor = RGB(VScrollone.Value, VScrolltwo.Value, VScrollthree.Value)
lbltwo.Caption = "Green: " & VScrolltwo.Value
End Sub
Private Sub VScrollthree_Change()
Picture1.BackColor = RGB(VScrollone.Value, VScrolltwo.Value, VScrollthree.Value)
lblthree.Caption = "Blue: " & VScrollthree.Value
End Sub
Subscribe to:
Posts (Atom)