Tuesday, August 4, 2009
EXERCISE NO. 3
Private Sub VScrollGENA3_Change()
Picture1.BackColor = RGB(VScrollGENA3.Value, VScrollGENA2.Value, VScrollGENA1.Value)
LabelR.Caption = "Red: " & VScrollGENA3.Value
End Sub
Private Sub VScrollGENA2_Change()
Picture1.BackColor = RGB(VScrollGENA3.Value, VScrollGENA2.Value, VScrollGENA1.Value)
LabelG.Caption = "Green: " & VScrollGENA2.Value
End Sub
Private Sub VScrollGENA1_Change()
Picture1.BackColor = RGB(VScrollGENA3.Value, VScrollGENA2.Value, VScrollGENA1.Value)
LabelB.Caption = "Blue: " & VScrollGENA1.Value
End Sub
EXERCISE NO. 2
Dim RGBValue As Integer
Private Sub cmdgena1_Click()
Coins1.Visible = False
lblgena2.Caption = Int(Rnd * 10)
lblgena3.Caption = Int(Rnd * 10)
lblgena4.Caption = Int(Rnd * 10)
If (lblgena2.Caption = 7) Or (lblgena3.Caption = 7) Or (lblgena4.Caption = 7) Then
Coins1.Visible = True
Beep
End If
End Sub
Private Sub cmdgena2_Click()
End
End Sub
Private Sub mnuAuthor_Click()
frmgena2.Show
End Sub
Private Sub mnuBlue_Click()
Frmgena1.BackColor = RGB(10, 10, 150)
End Sub
Private Sub mnuGreen_Click()
Frmgena1.BackColor = RGB(10, 150, 10)
End Sub
Private Sub mnuOrange_Click()
Frmgena1.BackColor = RGB(255, 121, 0)
End Sub
Private Sub mnuPink_Click()
Frmgena1.BackColor = RGB(255, 201, 255)
End Sub
Private Sub mnuRed_Click()
Frmgena1.BackColor = RGB(255, 0, 0)
End Sub
Private Sub mnuViolet_Click()
Frmgena1.BackColor = RGB(99, 0, 86)
End Sub
Private Sub mnuYellow_Click()
Frmgena1.BackColor = RGB(255, 255, 0)
End Sub
EXERCISE NO. 1
Subscribe to:
Posts (Atom)