开发者

How do I stop TWebBrowser from flickering?

开发者 https://www.devze.com 2023-03-16 03:22 出处:网络
My TWebBrowser flickers when its parent resizes. I tried some of the things mentioned HERE such as 开发者_StackOverflow社区DoubleBuffering, disabling FullRepaint, adding those WMEnterSizeMove and WME

My TWebBrowser flickers when its parent resizes.

I tried some of the things mentioned HERE such as 开发者_StackOverflow社区DoubleBuffering, disabling FullRepaint, adding those WMEnterSizeMove and WMExitSizeMove procedures but nothing was worked yet.

EDIT: Also, I tried ControlStyle := ControlStyle + [csOpaque]; and

procedure T<<yourclassorform>>.StopFlicker(var Msg: TWMEraseBkgnd);
begin
  Msg.Result := 1;
end;

How do I minimize or stop the flickering?


I had the same kind of problem with flickering and I found out that it was the javaScript on the page causing the flickering. The javascript was calling some methods that were taking a long time, and thus the page was flickering.

In the end, reworking the content of the html page (it was a locally generated bit of HTML generated in the delphi app) only got so far. I investigated replacing TWebBrowser first with TEmbeddedWB from www.bsalsa.com, and eventually gave up on the embedded Internet Explorer completely, and have decided from here forward to only use the "Chrome Embedded Framework" and its delphi wrapper, which basically means you're using WebKit instead of IE.

0

精彩评论

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

关注公众号