VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Time and date

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

Rate 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

Download this snippet    Add to My Saved Code

Time and date Comments

No comments have been posted about Time and date. Why not be the first to post a comment about Time and date.

Post your comment

Subject:
Message:
0/1000 characters