twebbrowser

How to bypass Internet Explorer Enhanced Security when using embedded WebBrowser control?

[亡魂溺海] 提交于 2021-02-18 11:47:06
问题 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 with the WebBrowser control, causing it to not render at all: In this case, the UI of the software is driven as a WebBrowser control - making the software unusable. i could disable Internet Explorer Enhanced Security mode, but that is not practical.

How to force load a page in Twebbrowser control when this is not visible

放肆的年华 提交于 2021-02-18 11:31:10
问题 i need to execute some javascript functions from delphi code, but this functions fails if the page is not loaded in the Twebbrowser control. so the problem is if page is located in a tabshet wich is not active the page is not loaded until the tabsheet is become active. the question is How to force load a page in a Twebbrowser control when this is not visible. to test this behaviour just put a pagecontrol, with 2 tabsheets , and a twebbrowser in the second tabsheet, now in the oncreate event

IHTMLDocument2 and Internet Explorer 11 changes on Windows 7

纵然是瞬间 提交于 2021-01-28 00:15:57
问题 I use TWebBrowser to have HTML editor in my application and of course it depends on version of Internet Explorer installed. I noticed after installation of the brand new Internet Explorer 11 on Windows 7 that my editor has changed. Paragraphs no longer seem to have same HTML code. HTML generated before when I pressed enter key: <P> </P> HTML generated now: <P><BR></P> This gives me additional line in my editor which doesn't look right. <P> itself has a new line, <BR> is completely useless

How to make TWebBrowser ignore accelerator chars of others controls?

北慕城南 提交于 2020-08-03 03:25:11
问题 I have a TWebBrowser placed on a form with the designMode enabled. Bellow the browser I have a close button with the Caption set to 'Clos&e'. When I am editing the contents of a document inside the WebBrowser and I press the key E the button close is called. It appears that it is treating TWebBrowser like other controls that don't handle keys and/or don't accept chars (e.g. TButton). How can I solve this? Thanks in advance. 回答1: Descend from TWebBrowser, override the CN_CHAR message handler,

How to ignore accelerator chars in TWebBrowser (design mode)

痴心易碎 提交于 2020-07-22 05:59:05
问题 I have essentially the same problem like the one described in this question: How to make TWebBrowser ignore accelerator chars of others controls? So the TWebBrowser is in design mode and accelerator keys from TAction are executing associated action. The solution was: type TWebBrowser = class(SHDocVw.TWebBrowser) procedure CNChar(var Message: TWMChar); message CN_CHAR; end; ... procedure TWebBrowser.CNChar(var Message: TWMChar); begin Message.Result := 0; end; I'd like to try the solution

Disable Google Maps user agent check

帅比萌擦擦* 提交于 2020-01-23 19:27:30
问题 Starting with version 3.29, the Google Maps JavaScript API checks the browser's navigator.userAgent and shows a compatibility warning. I'm displaying a map in an embedded web browser control. By default, the control runs in IE 7 compatibility mode -- I can override that with an X-UA-Compatible tag. The page looks like this: <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <style> #map { height: 400px; width: 100%; } </style> </head> <body> <div id="map"><

Disable Google Maps user agent check

非 Y 不嫁゛ 提交于 2020-01-23 19:27:09
问题 Starting with version 3.29, the Google Maps JavaScript API checks the browser's navigator.userAgent and shows a compatibility warning. I'm displaying a map in an embedded web browser control. By default, the control runs in IE 7 compatibility mode -- I can override that with an X-UA-Compatible tag. The page looks like this: <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <style> #map { height: 400px; width: 100%; } </style> </head> <body> <div id="map"><

Screenshot of Webbrowser

纵然是瞬间 提交于 2020-01-17 14:07:07
问题 I have a TwebBrowser on a form, of which I need to take a Screenshot. Some may think Isn't this a dublicate. But it's not, because the solutions in the orter answers doesn't work, thay all just gives med a black screen. Så I try to get my pixels from DC(0) First some source code: Place a TWebBrowser and a TButton on a form, and add the following code to a OnCreate Event: procedure TForm1.FormCreate(Sender: TObject); var Doc: Variant; begin Width := 1350; Height := 860; with WebBrowser1 do

Check if Element with ID has a value

拜拜、爱过 提交于 2020-01-16 13:31:13
问题 How to check if "Some text value" in element p with Id = "SomeID" is there? <p id="SomeID" class="error" style="display: none"></p> <p id="SomeID" class="error" style="display: none">Some text value</p> Here it is in a function form.. function ElementIdText(Web:TembeddedWB; Id:string):string; var node: string; begin if Assigned(Web.Document) and web.DocumentLoaded then begin node:=Web.OleObject.Document.GetElementByID(Id).innerText; if not VarIsNull(Node) and not VarIsClear(Node) and not

Pressing Buttons on a web page via Delphi [duplicate]

五迷三道 提交于 2020-01-15 04:28:06
问题 This question already has answers here : How to find a button with “value” in html page (Webbrowser - Delphi) (2 answers) Closed 5 years ago . Ex1: WebBrowser.OleObject.Document.GetElementByID('ID HERE').Click; Ex2: < input type="submit" VALUE="Login" > The above two examples are for pressing buttons on web pages via Delphi. Ex2 works well on various web sites but not all. Is this because Ex2 only works on HTML buttons? I tried Ex1 but some code is missing, when I try it, I get a message