The drawing get erased on minimizing the form
Hi friends,
I am drawing several circles/recatangles etc. with this code but whenever I use to minimize the form of other form come on its front the drawings get erased.
System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);
System.Drawing.Graphics formGraphics = panelforImage.CreateGraphics();
formGraphics.FillRectangle(myBrush, new Rectangle(0, 0, 200, 150));
myBrush.Dispose();
formGraphics.Dispose();
Please help me out.