All you have to do is derive your class from Panel:
class SpecialPanel: System.Windows.Forms.Panel
{
}
from MSDN Control.SetStyle:
public void EnableDoubleBuffering()
{
// Set the value of the double-buffering style bits to true.
this.SetStyle(ControlStyles.DoubleBuffer |
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint,
true);
this.UpdateStyles();
}
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"JH" <jh******@netzero.net> wrote in message
news:08****************************@phx.gbl...
I am attempting to enable double buffering for a panel
control. The SetStyle method of the panel control is
protected, so I am attempting to access it by writing a
special panel class that inherits from
System.Windows.Forms.Panel.
But from there I am not sure how to access the protected
member SetStyle to set DoubleBuffer to true. Can anyone
point me in the right direction? Some code example would
be extremely helpful to me.
Thanks
JH