Groups | Blog | Home
all groups > vb.net controls > august 2004 >

vb.net controls : AutoRedraw alternative?



Ray
8/8/2004 12:51:30 AM
The AutoRedraw property of the forms is no longer with us it seems.

I can use the paint event but it's slow, if I drag a msgbox over my
control/form I get flickering. If I drag the msgbox over a dotNET control
(like a large datagrid) it doesn't flicker!

Any suggestions?

Ray.

hirf-spam-me-here NO[at]SPAM gmx.at
8/9/2004 10:48:15 AM
* "Ray" <not@needed.com> scripsit:
[quoted text, click to view]

Add this to your ctor:

\\\
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
///

--
Herfried K. Wagner [MVP]
Ray
8/9/2004 11:06:17 AM
Thanks Herfried,
I tried a bunch of variations with that code and I'm getting no noticable
improvement.
In fact trying it again this morning and using SetStyle is definitley
slower!


[quoted text, click to view]

AddThis Social Bookmark Button