Re: Slow redraw of controls when scrolling by Philipp
Philipp
Wed Jan 17 15:23:18 CST 2007
hello silver,
I guess during scroll all controls are repainted, this may also result
in a slight flicker. I had this problem myself with some controls I
designed. Try to put the following line in the user control constructor
(myControl.Designer.vb or .cs)
Me.DoubleBuffered = True (or this.DoubleBuffered = true; if you are
using c#)
and tell us if it solves the problem.
This setting forces all control drawing to take place in a second
buffer before it is sent to the screen.
Regards
Philipp Fabrizio
silver schrieb:
> Hi all!
>
> I am running VS2005/,NET 2.0, and experience really slow performance on
> the refresh rate of GUI when scrolling my forms.
>
> To debug, I just created a clean UserControl and added about 50 empty
> textboxes to it, no databinding, and set the AutoScroll property to
> true.
>
> When scrolling, the screen is updated really slow, the textboxes are
> drawn partially, and blurr. CPU usage is 95-100%.
>
> Does anybode know why this happens?
>
> Best regards
> Anders