I am writing an MDI application in C# that contains two child forms which are referenced through DLL (stand alone projects added to references). One child form (call it form1) is performing animation based on graphic objects using a timer. This project (child form1) works fine until the other child form (call it form2) is loaded. What happens is that animation on the first form (form1) stops, but when I close this second child form (form2) animation continues with no problem.
I use this code in form2:
private void FlyingBeeForm_Paint(object sender, PaintEventArgs e) {
Graphics g = e.Graphics;
DrawImages(g);
System.Threading.Thread.Sleep(50);
this.Invalidate();
}