I am new to C#, and I have searched I but didn't find a simple solution to my problem.
I am creating a Windows form application.
After the start button is clicked, it counts every millisecond and when it reaches specific values from an array changes a label.
How can milliseconds be counted?
Loading
Jane AbramsPosted Nov 22, 2012, 5:51 PM
FroglegPosted Nov 22, 2012, 3:40 PM
drag a timer onto form and set interval to 1
public partial class Form1 : Form
{
int milli = 0;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
milli++;
label1.Text = milli.ToString();
}
}