如何从闪烁停止TWebBrowser? [英] How do I stop TWebBrowser from flickering?

查看:182
本文介绍了如何从闪烁停止TWebBrowser?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的TWebBrowser闪烁。

My TWebBrowser flickers when its parent resizes.

我尝试了一些提到的事情<一href=\"http://stackoverflow.com/questions/1454190/how-can-i-make-my-form-resize-more-smoothly\">HERE如DoubleBuffering,禁用FullRepaint,添加这些WMEnterSizeMove和WMExitSizeMove程序,但什么也没有尚未奏效。

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

编辑:
另外,我试过 ControlStyle:= ControlStyle + csOpaque];

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

如何最大限度地减少或停止闪烁?

How do I minimize or stop the flickering?

推荐答案

我有同样的与闪烁问题,我发现,这是JavaScript的导致闪烁在页面上。 JavaScript的在呼唤一些方法,是需要很长的时间,从而网页被忽隐忽现。

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.

在最后,返工的HTML页面的内容(这是在Delphi应用程序生成的HTML的本地生成的位),只得到了这么远。我调查了从www.bsalsa.com与TEmbeddedWB第一取代TWebBrowser,并最终放弃了对嵌入式Internet Explorer的完全,并从这里向前已经决定只使用铬嵌入式框架,其包装德尔福,这基本上意味着你'再利用,而不是IE浏览器的WebKit。

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.

这篇关于如何从闪烁停止TWebBrowser?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆