C# Exercises

Home AgriMetSoft About Contact

How to Create Digital Clock in WinForms C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Digital_Clock_Example
  public partial class Form1 : Form
    Timer timer;
    public Form1()
      timer = new Timer();
      timer.Interval = 1;
      timer.Tick += timer_Tick;
    void timer_Tick(object sender, EventArgs e)
      label1.Text = DateTime.Now.ToString("HH:mm:ss");

Download the project of Visual Studio 2013 in DropBox Download

How to Make Digital Clock in WinForms - C# Digital Clock Example

List of Exercises