blah blah blah is here! blah blah » Close

up0down
link

i was making some code with GDI+ when i discovered that when i minimize the form and re maximize it, all drawing made out site the OnPaint will be gone!!!!!
Please help me to find out how to solve this problem

last answered 8 months ago

1 answers

up0down
link

Try to set a color for transparent key,
this.TransparencyKey = Color.FromArgb(150, 0, 0); //for example

up0down
link

I think this has no relation to the problem i described
i said that when i draw thing in run time like drawing lines wherever the mouse goes (Like Making the mouse pointer as a pen) this works great until the form is minimized and remaximized all the drawing are gone.
it also happens when another form comes over that form.
I hope i am clear

up0down
link

I know that's there's no relation between these problem, but when I tried this, it worked :-( dont know why ????
My prob was: When I draw on a form, and I drag another Windows form over it, the dragging form acted like an eraser, the same thing happened when I minimized or maximized it. But one time, I was drawing shaped form (then, of course had to define transparent key), this problem disappeared. Until now, I can use it but dont know why?

up0down
link

Thanks i'll try it

This post was imported from csharpfriends, if you have a similiar question please ask it again.

All previous members have been migrated, hope you enjoy the new platform!

Feedback