Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Name: Ella Shane L.

Alvarado Grade and Section: 10- Einstein

COMPILATION OF ACTIVITIES IN ICT


ACTIVITY #1

CODE:

Private Sub cmdclear_Click()

Me.txtfname.Text = ""

Me.txtmname.Text = ""

Me.txtlname.Text = ""

Me.lblfullname = ""

End Sub

Private Sub cmdclose_Click()

End

End Sub

Private Sub cmdok_click()

Me.lblfullname.Caption = Me.txtfname.Text + " " + Me.txtmname.Text + " " +


Me.txtlname.Text

End Sub

Private Sub command1_click()

Me.txtfname.Text = ""

Me.txtmname.Text = ""

Me.txtlname.Text = ""

End Sub
ACTIVITY #2

CODE:

Dim starttime As Variant

Dim endtime As Variant

Dim elapsedtime As Variant

Private Sub cmdendtime_Click()

endtime = Now

elapsedtime = endtime - starttime

Me.lblendtime.Caption = Format(endtime, "hh:mm:ss")

lblelapsetime.Caption = Format(elapsedtime, "hh:mm:ss")

End Sub

Private Sub cmdExit_Click()

End

End Sub

Private Sub cmdStarttime_Click()

starttime = Now

Me.lblstarttime.Caption = Format(starttime, "hh:mm:ss")

Me.lblendtime.Caption = ""

Me.lblelapsetime.Caption = ""

End Sub
ACTIVITY #3

CODE:

Private Sub TimerDisplay_Timer()

Dim Today As Variant

Today = Now

lblDay.Caption = Format(Today, "dddd")

lblMonth.Caption = Format(Today, "mmmm")

lblYear.Caption = Format(Today, "yyyy")

lblNumber.Caption = Format(Today, "d")

lblTime.Caption = Format(Today, "h:mm:ss ampm")

End Sub
ACTIVITY #4

CODE:

Private Sub cmdOk_Click()

If Me.txtusername.Text = "Ellaskie" Then

If Me.txtpassword.Text = "bagangan" Then

MsgBox ("Access Granted!!")

Form2.Show

Else

MsgBox ("Invalid Password!!!"), vbInformation

Exit Sub

End If

Else

MsgBox ("Username not found!!")

Exit Sub

End If

End Sub
ACTIVITY #5

CODE:

Private Sub cmdclear_Click()

Me.txtsci.Text = ""

Me.txtfil.Text = ""

Me.txteng.Text = ""

Me.txtmath.Text = ""

Me.lblave.Caption = ""

Me.lbldesc.Caption = ""

End Sub

Private Sub cmdcompute_Click()

Me.lblave.Caption = (Val(Me.txtsci.Text) + Val(Me.txtfil.Text) + Val(Me.txteng.Text) +


Val(Me.txtmath.Text)) / 4

If Me.lblave.Caption >= 97 And Me.lblave.Caption <= 100 Then

Me.lbldesc.Caption = "Masaya tayong lahat!"

ElseIf Me.lblave.Caption >= 95 And Me.lblave.Caption <= 96 Then

Me.lbldesc.Caption = "Mag Jollibee kana!"

ElseIf Me.lblave.Caption >= 90 And Me.lblave.Caption <= 94 Then

Me.lbldesc.Caption = "Palabok na yan!!"

ElseIf Me.lblave.Caption >= 85 And Me.lblave.Caption <= 89 Then

Me.lbldesc.Caption = "Gasakit ang ngipon!"

ElseIf Me.lblave.Caption >= 75 And Me.lblave.Caption <= 84 Then

Me.lbldesc.Caption = "Sungaw baba mo!"

ElseIf Me.lblave.Caption < 75 Then

Me.lbldesc.Caption = "Bebot Bebot!!"

End If

End Sub

You might also like