Run a Digital Clock on your WinForm

Set the timer and the refresh period. (1 second)

timer1.Enabled = true;
timer1.Interval = 1000;

Then you need to implement what you want the timer to do every 1 second:

private void timer1_Tick(object sender, EventArgs e)
{
    DigiClockTextBox.Text = DateTime.Now.TimeOfDay.ToString();
}

Leave a Comment