开发者

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

开发者 https://www.devze.com 2022-12-08 22:54 出处:网络
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

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

精彩评论

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