by mohammad akram (4 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 10th February 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Time and date
'Declarations
'add a timer 2 labels and a button
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
Dim time As Integer
Label1.Text = Format(time, "hh:mm:ss")
Label1.Text = TimeString
Label2.Text = DateString
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim time As Integer
Label1.Text = Format(time, "hh:mm:ss")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim time As Integer
Label1.Text = Format(time, "hh:mm:ss")
Label1.Text = TimeString
Label2.Text = DateString
End Sub
End Class