Hi,
you can set the forms double buffered property to true
and you can set special style flags which can make the
painting of your the way you want it. Also you can override
the WndProc of the forms and catch window messages
and manipulate the windows message queue.
See here for the Flasg and Double Buffer:
[ControlStyles]
http://msdn2.microsoft.com/en-us/library/system.windows.forms.controlstyles(VS.80).aspx
[Control.DoubleBuffered Property]
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.doublebuffered(VS.80).aspx
What i recommend is to set everything you want in
a class where you inerit from the control/form of
interesst and set its flags and properties in tis constructor.
Something like that here i made for a ListView Control
to reduce its filcker on redrawing new elements dramatically:
public REListView(){
//Activate double buffering
this.SetStyle(ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
protected override void OnNotifyMessage(Message m)
{
if(m.Msg !=
(int)REWin32ApiClass.Win32ApiConstants.WindowsMessages.WM_ERASEBKGND)
{
base.OnNotifyMessage(m);
}
}
Just see as example,...
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
(E-Mail Removed)
Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2
Microsoft Live Space:
http://kerem-g.spaces.live.com/
Latest Open-Source Projects:
http://entwicklung.junetz.de
Sign my guestbook:
http://entwicklung.junetz.de/guestbook/
-----------------------
"This reply is provided as is, without warranty express or implied."