Prevent downloading TWebBrowser Delphi

0

I have 1 WebBrowser that when loaded a URL it should load an image according to a query in the DB. It happens that the first time the request is made, it opens the screen to save that image, if closing this window it proceeds normally. Any way to cancel the donwload?

    
asked by anonymous 21.10.2017 / 02:51

1 answer

1

In the OnDownloadBegin event you can schedule a Abort . This will stop the download, however, you should be careful with this procedure, in some cases it may stop loading the page.

procedure TForm5.WebBrowser1DownloadBegin(Sender: TObject);
begin
  Abort;
end;

I do not particularly use TWebBrowser (which is an instance of Internet Explorer (6x if not mistake)) that does not support HTML5 and lousy in the process of js .

Today I'm using Chromium, I recommend giving a search on the subject!

    
25.10.2017 / 12:11