I have a lblCountdown with an int value of 60. I want to make the int value of the lblCountDown decrease with seconds until it reaches 0.
This is what I have so far:
You need a public class for Form1 to initialize.
See this code:
namespace TimerApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private int counter = 60;
private void button1_Click(object sender, EventArgs e)
{
//Insert your code from before
}
private void timer1_Tick(object sender, EventArgs e)
{
//Again insert your code
}
}
}
I've tried this and it all worked fine
If you need anymore help feel free to comment :)