E
Ernst Sauer
Hello,
I have a Form1 with buttons and a partial class Form2 for my drawings.
For scaling the graphic I use a handler in Form1:
private void plusV_Click(object sender, EventArgs e)
{ factorf *= 2; // scaling factor
child.Invalidate(); // Form2 has OnPaint
}
This works fine.
Now I want a simple animation tool, something like that.
private void pluslusV_Click(object sender, EventArgs e)
{ for (int i=1; i<=10; i++)
{ factorf *= 2;
child.Invalidate();
Thread.Sleep(100); // or 1000
}
}
But this handler shows me only the last picture, not 10 in
10 time intervals.
Thanks for help
Ernst
I have a Form1 with buttons and a partial class Form2 for my drawings.
For scaling the graphic I use a handler in Form1:
private void plusV_Click(object sender, EventArgs e)
{ factorf *= 2; // scaling factor
child.Invalidate(); // Form2 has OnPaint
}
This works fine.
Now I want a simple animation tool, something like that.
private void pluslusV_Click(object sender, EventArgs e)
{ for (int i=1; i<=10; i++)
{ factorf *= 2;
child.Invalidate();
Thread.Sleep(100); // or 1000
}
}
But this handler shows me only the last picture, not 10 in
10 time intervals.
Thanks for help
Ernst