Hi
You can use a timer to achieve this. The following lines of code are just for your information.
Code Snippet
Databinding
public partial class Form6 : Form
{
public Form6()
{
InitializeComponent();
}
int i = 0;
private void timer1_Tick(object sender, EventArgs e)
{
this.label1.Text = i.ToString();
if (i < 5000)
i++;
else
this.timer1.Enabled = false;
}
private void button1_Click(object sender, EventArgs e)
{
this.timer1.Enabled = true;
i = 0;
}
}
You can use google to search for other answers
|