Wednesday, September 30, 2009

Friday, September 18, 2009

Thursday, August 6, 2009

Activity 1



Code:

'Author: Yul Bryan B. Bringuer
'Cell #: 09236198230
'Address: Lapu-Lapu Ext., Digos City
'Course: BSIT

Private Sub cmdwin_Click()
Timer1.Enabled = True
Timer1.Interval = 100

Timer1_Timer
Me.cmdwin.Visible = False
CommandButton1.Visible = True

End Sub

Private Sub cmdend_Click()
Unload Me
End Sub

Private Sub CommandButton1_Click()
Me.CommandButton1.Visible = False
Me.Timer1.Enabled = False
Me.Timer1.Interval = 0

Me.cmdwin.Visible = True

If Me.lblone.Caption = "7" Or Me.lbltwo.Caption = "7" Or Me.lblthree.Caption = "7" Then
Me.Coins.Visible = True
Me.Label2.Caption = Me.Label2.Caption + 1
Beep
Else
Me.Label3.Caption = Me.Label3.Caption + 1

End If

End Sub

Private Sub Timer1_Timer()
Coins.Visible = False

lblone.Caption = Int(Rnd * 10)
lbltwo.Caption = Int(Rnd * 10)
lblthree.Caption = Int(Rnd * 10)

End Sub

Activity 2




Code:

'Author: Yul Bryan B. Bringuer
'Cell #: 09236198230
'Address: Lapu-Lapu Ext., Digos City
'Course: BSIT

Dim RGBValue As Integer

Private Sub mnuAuthor_Click()
frmAuthor.Show

End Sub

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

Private Sub mnuClose_Click()
Unload Me
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
Private Sub cmdwin_Click()
Timer1.Enabled = True
Timer1.Interval = 100

Timer1_Timer
Me.cmdwin.Visible = False
CommandButton1.Visible = True

End Sub

Private Sub cmdend_Click()
Unload Me
End Sub

Private Sub CommandButton1_Click()
Me.CommandButton1.Visible = False
Me.Timer1.Enabled = False
Me.Timer1.Interval = 0

Me.cmdwin.Visible = True

If Me.lblone.Caption = "7" Or Me.lbltwo.Caption = "7" Or Me.lblthree.Caption = "7" Then
Me.Coins.Visible = True
Me.Label2.Caption = Me.Label2.Caption + 1
Beep
Else
Me.Label3.Caption = Me.Label3.Caption + 1

End If

End Sub

Private Sub Timer1_Timer()
Coins.Visible = False

lblone.Caption = Int(Rnd * 10)
lbltwo.Caption = Int(Rnd * 10)
lblthree.Caption = Int(Rnd * 10)

End Sub

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