Hello everyone
I have made a windows form application using Visual C# 2008. The form conntains a panel where im drawing different graphics objects like arcs, lines etc. But the problem is that when the window is restored after being minimized, the panel is refreshed i.e. every figure is erased. Can anyone suggest any solution please.
Thanx
Ahsan

Edited 6 Years Ago by Ahsan Baig: n/a

you need to look at persistent graphics. When you minimise the form all of its controls are invalidated, when it is restored they each call their paint method. Unless you draw your custom images inside the paint methdo they wont be kept when the control repaints.

you need to look at persistent graphics. When you minimise the form all of its controls are invalidated, when it is restored they each call their paint method. Unless you draw your custom images inside the paint methdo they wont be kept when the control repaints.

Thanx for the help. But can you please give an example showing how to use persistent graphics.
Thanx
Ahsan

i gave you a link to a full tutorial.
Have a go for yourself and if you get stuck we'll help you figure out where your going wrong.

This article has been dead for over six months. Start a new discussion instead.