开发者

How do I suppress flicker from the webbrowser control in .Net, when it is resized?

Not all pages do this, but a good example would be youtube.com. Mostly if you are resizing the window larger, opposed to smaller. Lots of content flickers horribly in this case. I've seen some posts on the net attempt to claim sorts of double buffering will stop this, but I've yet to see any example of the proper implementation. Thank you.开发者_运维技巧


Handle the Resize event of the form containing the WebBrowser control.

In this event force the Form (and child controls) to update themselves. It's a bit unintuitive but this greatly reduces flickering in my application.

   private void Form1_Resize(object sender, EventArgs e)
   { 
       this.Update();      
   }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜