QM concepts ™: PROGRAMMING VB 6.0

PROGRAMMING VB 6.0

TIMER:

CODING FOR TIMER APPLICATION:

Private Sub cmdbbc_Click()

frmcalender.BackColor = vbBlue

End Sub

Private Sub Timer1_Timer()

Dim today As Variant

today = Now

Lbltime.Caption = Format(today, "hh:mm:ss")

lblmiriam.Caption = Format(today, "dddd")

Lblmable.Caption = Format(today, "mmmm")

Lblqim.Caption = Format(today, "d")

Lblmimie.Caption = Format(today, "yyyy")

End Sub

STOPWATCH APPLICATION:

CODING FOR STOPWATCH APPLICATION:

Dim Starttiming, Endtime, Elapsedtime As Variant

Private Sub cmdend_Click()

Endtime = Now

lblend.Caption = Format(Endtime, "hh:mm:ss")

Elapsedtime = Endtime - StartTime

lblelapsed.Caption = Format(Elapsedtime, "hh:mm:ss")

End Sub

Private Sub cmdexit_Click()

End

End Sub

Private Sub cmdstart_Click()

StartTime = Now

lblstart.Caption = Format(StartTime, "hh:mm:ss")

End Sub

COMPUTING APPLICATION APPLICATION:

CODING FOR COMPUTING APPLICATION:

Private Sub cmdcase_Click()

Select Case average

Case Is >= 80

Lblcgpa.Caption = "excellent"

Case Is >= 70

Lblcgpa.Caption = "V good"

Case Is >= 60

Lblcgpa.Caption = "good"

Case Is >= 50

End Sub

Private Sub CmdEnd_Click()

End

End Sub

Private Sub CmdErase_Click()

txtict = " "

Txtprog = ""

Lbltotal = ""

Lblaverage = ""

Lblcgpa = ""

End Sub

Private Sub cmdif_Click()

Dim ict As Single

Dim programing As Single

Dim total As Single

Dim average As Double

ict = Val(txtict.Text)

programming = Val(Txtprog.Text)

total = ict + programming

average = total / 2

Lbltotal.Caption = total

Lblaverage.Caption = average

If average >= 80 Then

Lblcgpa.Caption = "Excellent"

Else

If average >= 70 Then

Lblcgpa.Caption = "Very good"

Else

If average >= 60 Then

Lblcgpa.Caption = "Good"

Else

If average >= 50 Then

Lblcgpa.Caption = "Fair"

Else

Lblcgpa.Caption = "Fail"

End If

End If

End If

End If

End Sub

No comments:

Post a Comment

Copyright © QM concepts ™ Urang-kurai