找到你要的答案

Q:How to suppress ActiveX warning dialogs in TEmbeddedWB?

Q:如何抑制TEmbeddedWB的ActiveX警告对话框?

In a Delphi XE8 VCL Form project using TEmbeddedWB, in EmbeddedWB1 for security reasons I set both DontExecuteActiveX and DontDownloadActiveX properties to True:

I have also disabled dialog-boxes in EmbeddedWB1 by setting EmbeddedWB1.DialogBoxes.DisableAll to True:

However, when I navigate to a page like:
https://www.iplocation.net/
or:
http://www.hostip.info/
I still get ActiveX warning dialog boxes:

One or more ActiveX controls could not be displayed because either: 1) Your current security settings prohibit running ActiveX controls on this page, or 2) You have blocked a publisher of one of the controls. As a result, the page might not display correctly.

So how can I suppress these dialog boxes?

在Delphi VCL的形式xe8项目使用tembeddedwb,在embeddedwb1出于安全原因,我把DontExecuteActiveX和dontdownloadactivex属性为True:

我也禁用对话框中通过设置embeddedwb1.dialogboxes.disableall真正embeddedwb1:

However, when I navigate to a page like:
https://www.iplocation.net/
or:
http://www.hostip.info/
I still get ActiveX warning dialog boxes:

One or more ActiveX controls could not be displayed because either: 1) Your current security settings prohibit running ActiveX controls on this page, or 2) You have blocked a publisher of one of the controls. As a result, the page might not display correctly.

所以,我怎样才能抑制这些对话框?

answer1: 回答1:

Locate Your EmbeddedWB component -> Events -> OnScriptError: fill these lines here:

continuescript:=true;
showdialog:=false;

It's much better that turnin on "Silent" mode, some webpages not loading correctly with "Silent:=True" parameter...

Hope it helps

Locate Your EmbeddedWB component -> Events -> OnScriptError: fill these lines here:

continuescript:=true;
showdialog:=false;

让“沉默”模式转向,一些网页不正确加载“沉默:= true”参数…

希望有帮助

delphi  activex  twebbrowser  delphi-xe8  tembeddedwb