iinf

iinf

  • NA
  • 19
  • 0

The drawing get erased on minimizing the form

Dec 1 2010 12:37 AM
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.

Answers (2)