Delphi Firemonkey TWebbrowser doesn’t work on modal dialogs


I’m using Delphi XE8, FireMonkey, Win32

I’m trying to load a local HTML file in a TWebBrowser control that is in a modal dialog. I keep getting an OLE error, even when trying to do something as simple as this in a button click:

wbPreview.URL := ‘about:blank’;

Project WI.exe raised exception class EOleException with message ‘Unspecified error’.

I’m thinking that the WebBrowser control doesn’t work in a form/dialog that is not the main form of the app.

Does anyone have any insight on this? I’ve tried placing TWebBrowser on the main form, ensured that TWebbrowser in the dialog wasn’t in a child control (parent is the form), etc. Nothing works.

Comments are closed.