Is the way a picurebox draws itself different from how a panel does it

  • Thread starter Thread starter **Developer**
  • Start date Start date
D

**Developer**

I have a usercontrol that contains two pictureboxes

One is on top of the other.

The bottom one is the parent of the top one.

The top one is transparent.

I invalidate the top one often

I don't need all the bells and whistles of a picturebox so I change the top
one to a panel

Now when I invalidate I get much flashing.

Is there something about the way a picurebox draws itself that is different
from how a panel does it?

Can I fix the panel?

Even if I can, does it make more sense to use the picturebox?



Thanks in advance
 
Is there something about the way a picurebox draws itself that is
different from how a panel does it?

Considering your experience, I would say that is the logical conclusion.
(IOW, yes)
Can I fix the panel?

Yes, but -
Even if I can, does it make more sense to use the picturebox?

Yes, it does.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
 
I think the picture box uses a technique called double-buffering which uses
more memory when drawing but provides the ability to have a faster rate of
draw. This is set as a property on the control so you may be able to set it
on the panel. If you cant, you can set it on your user control.

HTH

Ciaran
 
Thanks, I'll try that


Ciaran said:
I think the picture box uses a technique called double-buffering which uses
more memory when drawing but provides the ability to have a faster rate of
draw. This is set as a property on the control so you may be able to set it
on the panel. If you cant, you can set it on your user control.

HTH

Ciaran
 
Back
Top