TWebBrowser is a VCL component available in the Delphi Internet tool-palette. It is defined in the `SHDocVw.pas` unit. It provides access to the Web browser functionality of Microsoft's Shell Doc Object and Control Library.
Questions tagged [twebbrowser]
476 questions
6
votes
3 answers
Which is the best way to load a string (HTML code) in TWebBrowser?
I have a string var 'HTMLCode' that contains HTML code. I want to load this code into the browser.
This is Embarcadero's code:
procedure THTMLEdit.EditText(CONST HTMLCode: string);
{VAR
Doc: IHTMLDocument2;
TempFile: string; }
begin
TempFile…

Gabriel
- 20,797
- 27
- 159
- 293
6
votes
2 answers
TWebbrowser in Windows 10: Microsoft Edge (formerly Spartan) / Internet Explorer legacy issues
We know Internet Explorer will be discontinued in Windows 10, being replaced by the new Microsoft Edge (formerly codenamed "Project Spartan").
There are millions of apps using TWebbrowser, a component that uses the Internet Explorer API.
Does…

delphirules
- 6,443
- 17
- 59
- 108
6
votes
1 answer
How do I set each TWebBrowser to use an independent proxy?
I have found all kind of examples about how to make TWebBrowser use a proxy (like 202.8.128.5:8080).
However all those examples are changing the proxy globally for all running instances of TWebBrowser. I have two instances. How do I set a different…

Beno
- 163
- 8
6
votes
1 answer
Detect when the active element in a TWebBrowser document changes
Is there any event I can hook into to detect when the active element on a web page changes? For example, when a the user focuses an edit box.
I know I could check the active element in a timer, but I'd rather avoid this if possible.

norgepaul
- 6,013
- 4
- 43
- 76
6
votes
2 answers
What is the best way of detecting that a Delphi TWebBrowser web page has changed since I last displayed it?
I want to display a 'news' page in a form using Deplhi TWebBrowser. The news page is a simple HTML page which we upload to our website from time to time and may be output from various tools. The display is fine but I'd like to know in my app whether…

Brian Frost
- 13,334
- 11
- 80
- 154
6
votes
5 answers
Creating TWebBrowser in Runtime with Delphi
I have a TWebBrowser object which is created in runtime and used in background, that is, not visible. The problem is that events like OnDocumentComplete dont work or are not triggered in Delphi2009. Any advice?
procedure TfrmMain.FormCreate(Sender:…

Billiardo Aragorn
- 347
- 1
- 4
- 16
6
votes
1 answer
delphi webbrowser: how to prevent or hide that javascript error?
I am running TEmbeddedwb and I got a javascript timeout error while navigating on that TEmbeddedwb .
(I do not have this error while running in my internet explorer !)
The browser asks me if I want to stop the execution of the script.
I put the…

yarek
- 11,278
- 30
- 120
- 219
6
votes
2 answers
How to bypass Internet Explorer Enhanced Security when using embedded WebBrowser control?
i have a native Windows application that embeds the WebBrowser, i.e.
CLSID_WebBrowser
8856F961-340A-11D0-A96B-00C04FD705A2
Shell.Explorer.2
Unfortunately, when running on Windows Servers, the Internet Explorer Enhanced Security mode interferes…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
6
votes
1 answer
How do I save the contents of TWebBrowser, including user-entered form values?
is it possible to save entire document loaded in Webbrowser (in Delphi) as a ordinary HTML file with new values (I mean values entered by user in html's forms this document)?
I need this for reading this HTML document with all values next time when…

Artik
- 803
- 14
- 36
6
votes
1 answer
How to select
In my Delphi application I'm using a TWebBrowser control, where I have loaded an HTML document, containing a

yarek
- 11,278
- 30
- 120
- 219
6
votes
1 answer
How do I avoid the OnDocumentComplete event for embedded iframe elements?
I want to prevent iframe elements from triggering the OnDocumentComplete event every time. For example, a page has 4 iframes, and when I load this page, my OnDocumentComplete event runs 4 times. I want to run OnDocumentComplete just once for every…

Someone
- 728
- 2
- 12
- 23
5
votes
2 answers
TWebBrowser crashes with embedded Youtube clips
Here is my code:
type
TForm1 = class(TForm)
WebBrowser1: TWebBrowser;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
end;
implementation
uses…

kobik
- 21,001
- 4
- 61
- 121
5
votes
2 answers
TWebbrowser very slow to load real time markers from local google map HTML
I am actually displaying every 2 seconds many real time GPS points (20) by showing it from an index.html (using google maps to display and treat points) in my TWebBrowser, and it slows a lot my app.
And as i got another module under the same…

Gwenael
- 69
- 3
5
votes
2 answers
How to prevent delphi TWebBrowser for stealing focus
I'm going crazy with Delphi and WebBrowser component.
I created a simple application, to type HTML in a Memo and display the result inside the WebBrowser component.
But, when I click inside the WebBrowser, each HTML code update (in memo) results in…

Beto Neto
- 3,962
- 7
- 47
- 81
5
votes
2 answers
Extract Text from web page displayed in a TWebBrowser
I use delphi 7 and I would like to extract ONLY the text displayed in a webpage directly from a web page displayed in a TWebBrowser (no images....). Could it be done & how can I do it?

M0-3E
- 1,012
- 2
- 13
- 22