Thursday, September 17, 2009

Wednesday, August 5, 2009

eXcErCisE 1


Private Sub cmdCLICK_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


Beep
End If
End Sub

EXERCISE NO: 2










































Dim RGBValue As Integer
Private Sub cmdCLICK_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 cmdEXIT_Click()
End
End Sub

Private Sub mnuAuthor_Click()
frmprof.Show
End Sub

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

Private Sub mnuClose_Click()
End
End Sub

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


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

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

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

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

Private Sub mnuYellow_Click()
Frmvikhay.BackColor = RGB(255, 255, 0)
End Sub




EXERCISE NO: 3






Private Sub Command1_Click()
End
End Sub

Private Sub VScrollFirst_Change()
Picture1.BackColor = RGB(VScrollFirst.Value, VScrollSecond.Value, VScrollThird.Value)
lblRed.Caption = "Red: " & VScrollFirst.Value
End Sub

Private Sub VScrollSecond_Change()
Picture1.BackColor = RGB(VScrollFirst.Value, VScrollSecond.Value, VScrollThird.Value)
lblGreen.Caption = "Green: " & VScrollSecond.Value
End Sub

Private Sub VScrollThird_Change()
Picture1.BackColor = RGB(VScrollFirst.Value, VScrollSecond.Value, VScrollThird.Value)
lblBlue.Caption = "Blue: " & VScrollThird.Value
End Sub