开发者

Slow rendering objects while scrolling through a .net FlowLayoutControl

I have a FlowLayoutControl on my form th开发者_运维技巧at I am populating with 20-100 graphics heavy UserControls. The only problem I am having is that, while scrolling, the graphics "drag" (similar to dragging windows while it's slow, creating a duplicate image wherever the window is dragged).

I need a way to be able to scroll through the FLC without the images dragging or glitching. I need the scrolling to be smooth. Is there any possible way to buffer the controls or fix this problem without any MAJOR changes?

Thanks if you can!

(If you are confused about what I mean when referring to "Window Lag", it's something similar to the following example here)

Here is an actual picture of the lag issue I am dealing with:

Slow rendering objects while scrolling through a .net FlowLayoutControl


I had a similar problem and found that setting the WS_EX_COMPOSITED extended style on the parent form fixed it.

protected override CreateParams CreateParams
{
   get
   {
       CreateParams cp = base.CreateParams;
       cp.ExStyle |= 0x02000000;
       return cp;
   }
}

See http://social.msdn.microsoft.com/forums/en-US/winforms/thread/aaed00ce-4bc9-424e-8c05-c30213171c2c/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜