visual c# form update results in flickering

前端 未结 10 1078
眼角桃花
眼角桃花 2020-12-17 21:18

I have a .net app that I\'ve written in c#. On some forms I frequent update the display fields. In some cases every field on the form (textboxes, labels, picturebox, etc) ha

10条回答
  •  轮回少年
    2020-12-17 21:55

    the short answer is

    SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
    

    the long answer is: see MSDN or google

    just for fun, try calling Application.DoEvents() after each element is updated, and see if the problem gets better or worse ;-)

提交回复
热议问题