Hello everyone welcome to my programming channel. I will show you how to make countdown timer.
Let’s develop a simple count down using C sharp and windows form.
You may also like :C# Create Countdown with Timer
Click new project, open a new form and drop labels, text box, button and timer control to form from toolbox.
Set controls names as;
- label1 -> lbCounter
- textbox1 ->txtSeconds
- button1 -> btnStart
- timer1 -> timer1
Attach btsStart and timer1 to the program by double click and change program codes as below.
public partial class Form1 : Form
private void btnStart_Click(object sender, EventArgs e)
seconds = Convert.ToInt32(txtSeconds.Text);
txtSeconds.Enabled = false;
private void timer1_Tick(object sender, EventArgs e)
lbCounter.Text = seconds--.ToString();
if(seconds < 0)
txtSeconds.Enabled = true;