TimeOfDay gives me the time when the from is open first time but it does not update it later.
I like to have a clock that will show me the current time (9:36:53 PM - format) in a text box. How to do that?
Printable View
TimeOfDay gives me the time when the from is open first time but it does not update it later.
I like to have a clock that will show me the current time (9:36:53 PM - format) in a text box. How to do that?
User a Timer. Update the Textbox with the Tick event of the timer.
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 100 Timer1.Enabled = True End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = FormatDateTime(Now, DateFormat.LongTime) End Sub
The sandpaper lib has a real-time analog clock. Tres chic.