hello. how i put a real time clock in my form ? thank you

Recommended Answers

All 2 Replies

Assuming you want to display seconds, create a timer on the form, set the interval to 1000 (one second in milliseconds), then in the timer event handler, write the current time into a label. Make sure you set the Enabled property of the timer to True at some point (form load perhaps) to start the time update.

    Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
        lblTime.Text = TimeOfDay
    End Sub

Thank you Reverend Jim..........

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.