IE as OleVariant yields: Navigation to the webpage was canceled lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- RedOctober · 2020-06-14 20:24 Based on a very old related thread in this forum, I am using the following to pull up a copy of IExplore in a window in my Lazarus 1.8.4 project.  The browser appears in the window, but refuses to navigate to the supplied URL, which in this case is: https://www.lazarus-ide.org It just keeps showing the message "Navigation to the webpage was canceled".  I have researched this and have enabled all my TLS Advanced settings (TLS 1.0, .1.1, 1.2) and also added: https://www.lazarus-ide.org https://*.lazarus-ide.org to the Trusted Sites in IE's security settings.  When I use IE stand alone, and paste that URL into the URL edit box, it navigates to the site no problem.  Just when I call it as shown below, does it fail and give me the stated error message.  Any suggestions as to how I can solve this and let me users get to their web site(s) through my Lazarus app? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Uses Windows, Comobj; procedure TForm1.Button1Click(Sender: TObject);var browser: olevariant;begin browser := CreateOleObject('InternetExplorer .Application'); windows.setparent(browser.hwnd, form1.handle); // you can use panel1.handle, etc.. browser.toolbar:=false; browser.fullscree n:=true; browser.Resizable:=false; browser.visible:=true; Browser.Navi gate('https://www.lazarus-ide.org');end; ---------------------------------------------------------------------- RedOctober · 2020-06-14 22:05 .Navigate wants a WideString.  Problem solved.  I was using just a String. ---------------------------------------------------------------------- RedOctober · 2020-06-15 14:46 One last thing... The IE browser that appears in the parenting window "thinks" it's always in fsMaximized, even when the window is not maximized.  It is staying within the boundaries of the parent window, but not confining it's own size to the parenting window, and there are no scrollbars that appear to reposition it.  This means tha my end user must always use the parenting window in fsMaximized mode to see the web page.  I tried parenting the browser to a TPanel inside the parenting window, with Align set to alClient, but the browser just ignores that setting and continues to "act" as if it is inside a Maximized window.  The TWebBrowser in Delphi obeys the alClient setting of the parenting control, so I know it's possible. Maybe a better way to describe the problem is that the browser "thinks" it's being displayed on a full sized desktop monitor, but it's actually being displayed on a small screen like a tablet (without scrollbars).  Not sure if that helps with the explanation. Anyone know of the setting that I am missing that will tell the OleVariant spawned browser to OBEY the alClient setting of a panel? I am on Windows only, Laz 1.8.4, FPC 3.0.4   and here is the code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  unit f_netcare; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,  Windows, ComObj; type   { TfrmNetCare }   TfrmNetCare = class(TForm)    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);  procedure FormCreate(Sender: TObject);    procedure FormDestroy(Sender: TObject);  private    Browser: OleVariant;    exe_fnm: String;    procedure LoadDefaults;    procedure LoadPersistent;   public    procedure GoToClient(const pnt_uli: String);    procedure GoToURL(const url_str: String);  end; var  frmNetCare: TfrmNetCare; implementation uses u_gv; {$R *.lfm} { TfrmNetCare } procedure TfrmNetCare.FormClose(Sender: TObject; var CloseAction: TCloseAction);begin  CloseAction := caHide;end; procedure TfrmNetCare.FormCreate(Sender: TObject);begin  LoadDefaults;  LoadPersistent;end; procedure TfrmNetCare.FormDestroy(Sender: TObject);begin  Browser := Unassigned;end; procedure TfrmNetCare.LoadDefaults;begin  Browser := CreateOleObject('InternetExplorer.Application');  Windows.SetParent(Browser.hwnd, Self.Handle);  //Browser.ClientToWindow(Self.Left, Self.Top);  Browser.Visible := True;   Browser.Toolbar := False;  Browser.Fullscreen := True;  Browser.Resizable := False;  Browser.Visible := True; end; procedure TfrmNetCare.LoadPersistent;begin  //end; procedure TfrmNetCare.GoToClient(const pnt_uli: String);var go2url: String;begin  GV.NetCare.was_used := True;  go2url := StringReplace(GV.NetCare.BaseURL, '[LOGIN_ID]', GV.UsrProps.netcare_login_id, []);  go2url := StringReplace(go2url, '[AHC_ID]', pnt_uli, []);  GoToURL(go2url);end; procedure TfrmNetCare.GoToURL(const url_str: String);var w_url_str: WideString;begin  w_url_str := url_str;   Browser.Silent := True;  Browser.Navigate(w_url_str);  Show;  BringToFront;end; end.