Is the first time that I use timer, so probably I'm doing something wrong.
My code is something like this:
private void timer1_Tick(object sender, EventArgs e)
{
button2.PerformClick();
}
private void button2_Click(object sender, EventArgs e)
{
// random code here
timer1.Interval = 5000;
timer1.Start();
timer1_Tick(null,null);
}
What I want to do with this is: execute the random code, then wait the timer interval and execute the Tick (that will do a 'click' in the button again, for execute again the same), and repeat this for ever.
Sorry if is a easy mistake, I'm starting with this and don't know what I'm doing wrong.
Thanks you for read me! :D