private void timer1_Tick(object sender, EventArgs e)
{
button1.PerformClick();
}
or:
private void timer1_Tick(object sender, EventArgs e)
{
button1_Click(button1, null);
}
private void button1_Click(object sender, EventArgs e)
{
}
or (this is the preferred solution):
private void timer1_Tick(object sender, EventArgs e)
{
MyMethod();
}
private void button1_Click(object sender, EventArgs e)
{
MyMethod();
}
private void MyMethod()
{
}