Questions tagged [mshtml]

MSHTML was introduced in Microsoft Internet Explorer 4.0. It is the main HTML component of the Internet Explorer browser and can be used in other applications. It hosts Microsoft ActiveX Controls and supports the OLE Control '96 (OC96) specification for windowless controls.

MSHTML frequently comes into play when a WPF or WinForms application hosts a web browser control. To access MSHTML, the 'Add Reference' dialog is used as shown in the figure below...

Locating the MSHTML assembly

Reference articles for MSHTML can be found here

444 questions
0
votes
1 answer

IDocHostUIHandler crashing MSHTML.dll with error 0xc0000409

I am using slightly modified IDocHostUIHandler from https://stackoverflow.com/a/21699086/592212 in simple one main window test application with only WPF WebBrowser component in that Window. The initialization code is as follows: public…
Miro Hudak
  • 2,155
  • 2
  • 21
  • 29
0
votes
1 answer

Determining when WebBrowser Control Started processing the HTML

Is there a way to determine when the webbrowser control starts processing the HTML of the URL it navigated to? Looking for any event raised other than onreadystatechange (which does not have clear state for this)? Ontitlechange is not accurate…
GeorgeU
  • 7,819
  • 8
  • 26
  • 38
0
votes
1 answer

Can I detect failure on mshtml.IHTMLElement.click() call?

Can I determine if the click call was successfully? I'm debuggin an application that click on button (see below code) sometimes it seems fail to do so, I'd liek to determine whatever the click was successfully. HtmlElement button = ...; IHTMLElement…
Jack
  • 16,276
  • 55
  • 159
  • 284
0
votes
2 answers

Setting a web table scraper by Msxml2.ServerXMLHTTP.6.0 on Excel VBA

I need to do a web data scraper. I need to login to the site: user, password, click login button Click a second button Wait for page to load, here is the Table in question. The table is a call log and adds new content dynamically, so it is always…
0
votes
1 answer

Running JS or JQ using execScript always throws syntax error in mshtml

The error code is "0x80020101" and does not specify an actual part of the code that has an issue. The thing that really confuses me is that running the script through the console runs into no errors. The code looks like this: int index =…
Bitz
  • 1,128
  • 11
  • 33
0
votes
1 answer

Using MSHTML how do you set the focus on an input field?

Using MSHTML I'd like to set the user focus on a text element, what I've been given and tried so far doesn't work. CComPtr field; field->put_value( .. ); // I have the right element as I can set the text... VARIANT…
Greg Domjan
  • 13,943
  • 6
  • 43
  • 59
0
votes
1 answer

How to use mshtml to deal with the link which has JavaScript onclick {return false}

I met a case when I use mshtml to detect the event when click on a htmlelement like a href, I use the code below: DOMEventHandler onclickhandler = new DOMEventHandler(doc,null); onclickhandler.NewEventHandlers += new…
user498151
  • 151
  • 1
  • 5
0
votes
1 answer

vb6: click button on HTMLDocument by code and wait for page to be loaded

i'm using the mshtml.tlb for loading/parsing html and i'd like extend it for clicking elements by code. the problem is trapping the loading-process after eg. a button was clicked. in my specific case i'd like to perform a user-login. here's my…
Fuxi
  • 7,611
  • 25
  • 93
  • 139
0
votes
0 answers

How do I access mshtml.HTMLDocument.frames on multiple threads?

So, I have a main thread that captures an existing IE browser and saves the HTMLDocument in a variable. I attached an event handler to the "onload" event of this document because I need a frame that is located inside it. If I capture the frame in…
Apachi
  • 32
  • 5
0
votes
0 answers

Checking when a form is submitted and getting values

I have a WebBrowser with this page in it:
Submit …
Beginner
  • 77
  • 2
  • 10
0
votes
1 answer

Is there a way to programatically insert a Windows Forms control into an MSHTML (WebBrowser) instance?

I have an application that uses an embedded IE through the Windows Forms WebBrowser control. I want to embed some .NET controls into the HTML page. There is old support (since .NET 1.0) to use a special classid in an tag…
Pelle
  • 625
  • 1
  • 7
  • 17
0
votes
0 answers

IServiceProvider::QueryService fails with error -2147024809 on Windows server 2008 R2 having IE11

Acquiring the IAccessible pointer to an element within the page or the accessible window of the document for Window class Internet Explorer_Server is successfully using the code (where hwnd is the handle of Internet_Explorer_server)…
0
votes
2 answers

Detecting Render Start on Webbrowser Control

Trying to figure out when the webbrowser control starts rendering (displays something) to the end user. Any idea on how to achieve this?
timeitquery
  • 251
  • 1
  • 5
  • 14
0
votes
1 answer

Calling ActionScript (Flash) method via mshtml from C#

I use the WebBrowser component from WPF. I load there a page from Internet and I access the Document property to call my scripts. Unfortunately calling scripts don't work as I need. When I am calling JavaScript methods which exist in JavaScript so…
Tomáš Linhart
  • 13,509
  • 5
  • 51
  • 54
0
votes
1 answer

IE Extention/Plugin/Addon javascript injection in iframe and document c#

I am facing issue with BHO in C# ,Javascript not inject in iframe . How to get access of