Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Picture box lose drawing after reloading

Tags:

c#

.net

graphics

I currently working with PictureBox and facing one problem.

First, I have drawn one ellipse on the PictureBox.

It draws nicely on the picture box.

But when I minimizing the form and reload it again then the ellipse drawn on PictureBox have bin disappear.

Any one can suggest remedy for this problem…

Thanks……..

Regards, Pritesh Patel

like image 476
Pritesh Avatar asked Dec 06 '25 04:12

Pritesh


1 Answers

The Graphics object in .NET is not retained-mode, so you need to draw your ellipse within the Paint event for the object, in your case the picture box.

like image 117
Martin Avatar answered Dec 08 '25 18:12

Martin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!