Thursday, August 6, 2009
Activity 3
Code:
'Author: Yul Bryan B. Bringuer
'Cell #: 09236198230
'Address: Lapu-Lapu Ext., Digos City
'Course: BSIT
Private Sub cName_Click()
If cName.Value = True Then
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
Else
Me.Label5.ForeColor = RGB(0, 0, 0)
End If
End Sub
Private Sub CPic_Click()
If CPic.Value = True Then
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
Else
Me.Picture1.BackColor = RGB(0, 0, 0)
End If
End Sub
Private Sub VScroll1_Change()
Me.PicRed.BackColor = RGB(Me.VScroll1.Value, 0, 0)
Me.Label3.Caption = "Red: " & Me.VScroll1.Value & ""
If Me.cName.Value = True Then
Me.Label3.Caption = "Red: " & Me.VScroll1.Value & ""
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
ElseIf Me.CPic.Value = True Then
Me.Label3.Caption = "Red: " & Me.VScroll1.Value & ""
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
End If
If Me.CPic.Value = True Then
If Me.cName.Value = True Then
Me.Label3.Caption = "Red: " & Me.VScroll1.Value & ""
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
End If
End If
End Sub
Private Sub VScroll2_Change()
Me.PicGreen.BackColor = RGB(0, Me.VScroll2.Value, 0)
Me.Label2.Caption = "Green: " & Me.VScroll2.Value & ""
If Me.cName.Value = True Then
Me.Label2.Caption = "Green: " & Me.VScroll2.Value & ""
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
ElseIf Me.CPic.Value = True Then
Me.Label2.Caption = "Green: " & Me.VScroll2.Value & ""
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
End If
If Me.CPic.Value = True Then
If Me.cName.Value = True Then
Me.Label2.Caption = "Red: " & Me.VScroll2.Value & ""
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
End If
End If
End Sub
Private Sub VScroll3_Change()
'reference Value
Me.PicBlue.BackColor = RGB(0, 0, Me.VScroll3.Value)
Me.Label1.Caption = "Blue: " & Me.VScroll3.Value & ""
'============================================
If Me.cName.Value = True Then
Me.Label1.Caption = "Blue: " & Me.VScroll3.Value & ""
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
ElseIf Me.CPic.Value = True Then
Me.Label1.Caption = "Blue: " & Me.VScroll3.Value & ""
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
End If
If Me.CPic.Value = True Then
If Me.cName.Value = True Then
Me.Label1.Caption = "Red: " & Me.VScroll3.Value & ""
Me.Label5.ForeColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
Me.Picture1.BackColor = RGB(Me.VScroll1.Value, Me.VScroll2.Value, Me.VScroll3.Value)
End If
End If
End Sub
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment