Questions tagged [twebbrowser]

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.

476 questions
4
votes
2 answers

delphi hitting enter

How can I make an edit box so that when I hit enter with the cursor still in it. Then it goes to that website in the webbrowser which was in the edit box? can anyone help me?
drevet
  • 41
  • 1
  • 1
  • 2
4
votes
1 answer

How to suppress Script error warnings when using TWebBrowser in Delphi?

Possible Duplicate: how to disable javascript errors on “twebbrowser” ? I'm using the TWebBrowser component with Delphi 6.0 to display a YouTube web page. Sometimes I get a Script error message box from Internet Explorer, which TWebBrowser…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
4
votes
3 answers

How to always load a fresh page in TWebBrowser?

I am trying to load a web page into TWebBrowser using Browser.Navigate(URL). However, the browser won't care that the page was updated online so as long I won't restart the program it won't show the new page. A more concrete example: If I navigate…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
4
votes
1 answer

Total height of html document loaded into TWebBrowser

I want to know how to get TOTAL height of html document loaded into TWebBrowser component (Delphi)? I have found something like this and it is not working: webbrowser.oleobject.document.body.scrollheight I placed it inside OnDocumentComplete…
4
votes
1 answer

TPanel does not AutoSize when containing a TWebBrowser

I've found a another regression between Delphi 5 and Delphi XE6. I have a TPanel that is set to AutoSize itself to its contents (Panel is green): When the TPanel contains any other control, e.g. a TListView, the panel will auto-size itself to the…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
1 answer

Adding a script element to an existing TWebBrowser document

Prompted by a couple of SO qs this weekend, I decided to see if I could work out how to add some javascript in an Html element to a document loaded in a TWebBrowser. Doing so, I've run into an oddity which maybe someone can explain. Here's my Html…
MartynA
  • 30,454
  • 4
  • 32
  • 73
4
votes
1 answer

viewing XML like that of IE on Vista with TWebBrowser

On XP this code worked fine if I wanted to view XML in a TWebBrowser: uses ComObj, MSHTML, ActiveX; procedure DocumentFromString(ABrowser: TWebBrowser; const HTMLString: wideString); var v: OleVariant; HTMLDocument: IHTMLDocument2; begin if…
Vlad
  • 1,383
  • 14
  • 29
4
votes
1 answer

TWebbrowser massive memory leaks : no solution so far

I have an application that uses TWebbrowser to periodically navigate to a specific URL and extract some data. The app keeps runing 24x7 and does a lot of navigation in pages. The problem is that TWebbrowser has a well-known memory leak problem, in…
delphirules
  • 6,443
  • 17
  • 59
  • 108
4
votes
1 answer

How do I make standard actions (like TEditCopy) recognize additional controls (like TEmbeddedWB)?

I am generally satisified with functionality of TEditCut, TEditCopy, TEditPaste and TEditSelectAll except they don't work on any controls which are not standard. For example, they may work fine on TEdit or TMemo controls, but not on TEmbeddedWB —…
Coder12345
  • 3,431
  • 3
  • 33
  • 73
4
votes
2 answers

How to detect navigation in TWebBrowser as opposed to clicking URLs?

I'm using a TWebBrowser to display some HTML content (locally). The application is split in half, the top half has 5 tabs and the bottom half is the web browser. The contents of the browser change often, for example when changing to a different…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
4
votes
1 answer

How to interop with TAutoIntfObject object from a TWebBrowser control?

I'm having a TWebBrowser control which implements IDocHostUIHandler to extend the control of a JavaScript interop through the IDispatch container. This works fine, except that I don't know, how to dispatch event from JavaScript back to the web…
TLama
  • 75,147
  • 17
  • 214
  • 392
4
votes
1 answer

HTML source code from TWebBrowser - How to detect Stream encoding?

Based on this question: How can I get HTML source code from TWebBrowser If I run this code with a html page that has Unicode code page, the result is gibberish becouse TStringStream is not Unicode in D7. the page might be UTF8 encoded or other…
Vlad
  • 1,383
  • 14
  • 29
4
votes
2 answers

How to get all IHTMLStyle attributes of an IHTMLElement?

I use the below code: const HTML_DOC = '' + '

test

' + ''; procedure…
kobik
  • 21,001
  • 4
  • 61
  • 121
4
votes
3 answers

Emulate Keyboard Typing

How can I emulate typing of a real human in either TWebBrowser or TChromium. It can be either of those two.
Santos Oliveira
  • 497
  • 1
  • 8
  • 18
4
votes
1 answer

Detecting external content with TEmbeddedWB or TWebBrowser

I am trying to block anything external loaded by TEmbeddedWB or TWebBrowser (or TCppWebBrowser). I would like to block anything that is loaded from Internet including images, javascript, external CSS, external [embed] or [object] or [applet] or…
Coder12345
  • 3,431
  • 3
  • 33
  • 73