How to suppress ActiveX warning dialogs in TEmbeddedWB? - delphi

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?

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

Related

Delphi 10.2 - How to remove the Upcoming Events panel from the Welcom Page?

Is there a way to customize the Welcom Page? In particular I'd like to hide the Upcoming Events panel.
Here are a fiew questions about hiding the Welcome Page altogether, and I'd prefer to just remove the Upcoming Events panel if it's possible.
The Welcome Page is just a HTML page located in the Welcomepage subfolder of your Delphi installation.
To remove the Upcoming Events panel make sure you have write permission to the default.htm file in that folder. Then open default.htm in an editor, remove the div class="feedPanel" block and save the file.
In case your IDE setting is not set to English edit the default.htm in the folder of your current language setting.

How to show Find/Replace Dialog on SpreadsheetGear workbook?

How can I show from code SpreadsheetGear dialogs like Find/Replace?
There is WorkbookDesigner form which has most of those dialogs in main menu, but how can I implement it myself?
The "Find and Replace" dialog is not part of SpreadsheetGear's public API and so cannot be instantiated from code. Developers using Windows Forms have been able to "hack" this since a keyboard shortcut does exist to launch this dialog from the WinForms WorkbookView. This has been done by sending a Ctrl+F keystroke to the WorkbookView, using something like the following:
workbookView.Focus();
System.Windows.Forms.SendKeys.Send("^f");
WPF doesn't support this model since it is part of Windows Forms. However, it appears that using System.Windows.Forms.SendKeys.SendWait("^f") might work instead, but I make no guarantees of this.
Generally speaking, if a particular "dialog", such as the Find and Replace dialog, is not listed in the SpreadsheetGear.Windows.Forms namespace, then it is not available to instantiate from code.

In Dart, is there an equivalent MessageBox functionality as in C# using WinForms

I know there is a MessageBox class in the isolate library but that is not what I need. I am looking for the pop-up style messagebox functionality found in desktop windows apps (i.e. WinForm apps) where you ask a simple confirmation question and the user can click a yes or no button in response. Is there an equivalent in Dart, if not can anyone suggest some alternatives?
You can display a message box easily with :
window.alert('test');
don't forget this in the top of your file:
import 'dart:html';
This will behave like the alert function in JavaScript. If you want to add buttons (other then the default "ok" button) to your message window, then you will need to make a custom window, which would not be very hard. You create an element which you add to your document body. This element should be absolute positionned. Adding an overlay in front of your document will be useful to prevent user clicks on the page.
this is in javascript, but it is useful to know what to do with dom and css :
http://raventools.com/blog/create-a-modal-dialog-using-css-and-javascript/

Delphi: WebBrowser "ActiveX control" error

On some websites I navigate with TWebBrowser, after the loading of the site I get this:
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
I don't care if the page will display correctly or not, I just want it to display without this message!
How to disable this?
I have tried to temporarily enable everything in the Internet Options but no success, the message still appears.

Is it possible to view ActiveX controls on a page before I allow it to run?

A website is trying to run ActiveX controls. Is there any way I can look at them before I decide whether or not to run allow them?
In order to render itself, an ActiveX control/component needs to run.
So, no, it is impossible to get a "preview" of an ActiveX control without running it.

Resources