Questions tagged [microsoft.mshtml]

MSHTML (also known as Trident ) is a proprietary layout engine for the Microsoft Windows version of Internet Explorer, developed by Microsoft.

Filter by
Sorted by
Tagged with
5 votes
3 answers
1k views

mshtml.HTMLDocument how to hide a dynamically created div with class attribute

I am trying to load a load a Webpage in C# WebBrowser control (WPF not WinForm). Along with other content the page has a image rotator that Dynamically creates two divs having same class to utilize ...
5 votes
2 answers
3k views

Hooking the http/https protocol in IE causes GET requests to be sequential

I'm using the PassthruAPP method to hook into HTTP/HTTPS requests made by IE. It's working well for the most part, however I noticed a problem. Only one download thread is active at a time, normally ...
  • 321
5 votes
1 answer
2k views

mshtml.dll version is 8.0 and Microsoft.mshtml is 7.0

I'm a little confuse and maybe you can help me. I've the mshtml.dll (version 8.0) and the Microsoft.mshtml.dll (version 7.0) If I go to add a reference to my WPF project and try to add the mshtml....
  • 51
4 votes
4 answers
3k views

In HTML parsing Get Attributes of a tag in Cpp using IHTMLDOMAttribute

please help i am doing a html parsing using MSHTML. My code for getting all attributes of a particular tag is like this void GetAttributes(MSHTML::IHTMLElementPtr pColumnInnerElement) { ...
  • 5,977
4 votes
2 answers
2k views

Why doesn't MSHTML for .Net have querySelector and querySelectorAll, or where are they?

I want to use MSHTML [1] to access DOM in IE, but I have just found out that it lacks querySelector and querySelectorAll methods in HTML document classes, which will otherwise be very helpful to ...
3 votes
1 answer
3k views

Using Microsoft.MSHTML in a loop, memory leak

Hey, I am attempting to use the Microsoft.MSHTML (Version 7.0.3300.0) library to extract the body text from an HTML string. I've abstracted this functionality into a single helper method GetBody(...
  • 2,640
3 votes
0 answers
652 views

mshtml 8.0 and Microsoft.mshtml 7.0

I'm a little confuse and maybe you can help me. I've the mshtml.dll (version 8.0) and the Microsoft.mshtml.dll (version 7.0) If I go to add a reference to my WPF project and try to add the mshtml....
  • 31
2 votes
1 answer
1k views

Use explorer.document as source HtmlDocument for HtmlAgilityPack

I want to use currently loaded webpage in internet explorer as HtmlDocument in HtmlAgilityPack. I am using explorer document through mshtml as COM object. mshtml.HTMLDocument doc = explorer.Document ...
2 votes
2 answers
14k views

Fire event with vba & InternetExplorer.Application to recalculate jquery form

I'm trying to gather data from different websites. Therefore i'm using excel vba and start an internet explorer. I'm able to fill out a normal form. But sometimes i have to fill out a dynamic form ...
2 votes
2 answers
2k views

mshtml fireevent onchange not firing

I am unable to fire an "onchange" event in mshtml. Can you please tell me what I am doing wrong here. HTMLSelectElement element = (HTMLSelectElement)this.HTMLDocument.all.item(controlId, 0); ...
2 votes
1 answer
939 views

How to obtain IServiceProvider and IMarkupServices from HTMLDocument (mshtml)

Im doing some test creating an instance of HTMLDocument this way: object[] pageText = { "<p>some text...</p>" }; var document = new HTMLDocumentClass(); var document2 = (IHTMLDocument2)...
  • 1,943
2 votes
1 answer
255 views

How to make SHDocVw.InternetExplorer fire events that get caught with JS addEventListener?

The following problems: I need to simulate a double-click on a div element. I need to use/handle MS Internet Explorer 11. I cannot change the source code of the target site. My solution so far: I ...
  • 2,433
2 votes
0 answers
200 views

MSHTML DLL very slow to load at startup

I have a fairly large VB.NET WinForms project which loaded fine until recently. I have no recollection of any major changes in the startup code and I can only think of recent VS2019 upgrades that may ...
  • 68
2 votes
0 answers
174 views

mshtml and CLS-compliance

I am witnessing some odd behaviour with mshtml and CLS-compliance. I have an assembly marked CLSCompliant(true). This assembly does not expose any types from mshtml publicly. I can make the code ...
  • 1,396
2 votes
0 answers
605 views

WinForms problem with mshtml and ie9

IE9 appears to have broken my mshtml com based WebBrower html editor in my 32-bit winforms .net 3.5 application. (It has to be set to 32-bit due to an activex USB device controller I have to use.) ...
  • 7,715
1 vote
1 answer
6k views

How to execute javascript using the mshtml

mshtml.HTMLDocumentClass doc = (mshtml.HTMLDocumentClass)IE.Document; object script= doc.Script; object[] args = { FirstArgument , "FrameContent", "tree.aspx", "FrameNav" }; script.GetType()....
1 vote
2 answers
549 views

problems with "getElementsByClassName" in MSHTML.HTMLDocument

The problem happens only when used getElementsByClassName Dim HTTP As New MSXML2.XMLHTTP60 HTTP.open "POST", strWWW, False HTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; ...
1 vote
2 answers
231 views

How can I close the newly opened Internet Explorer using the mshtml

I want to close a newly opened Internet Explorer using the mshtml. I have a program , which takes values from different IE Window. The navigation to each Window is invoked using the Click() method ...
1 vote
1 answer
697 views

How to Redraw/Repaint an IHTMLElement pointing to an image element in the DOM in IE9?

I've got a valid IHTMLElement object that points to an image in IE9. The image data was recently updated via an IDirectDrawSurface. I'm trying to find a way to force IE9 to repaint the image in the ...
  • 92
1 vote
4 answers
3k views

ClickOnce Deployment, system update required Microsoft.mshtml

We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use ClickOnce to deploy the application. The application deploys without issues on most machines, but sometimes we ...
  • 84
1 vote
1 answer
72 views

ABCPDF with MSHTML engine not loading .JPG files

I am using ABCPDF and using the MSHTML engine for a certain report. It loads .PNG files fine, and our extensionless handler images, but when it comes to .jpg it shows an X. The pure HTML loads fine, ...
  • 22.2k
1 vote
1 answer
1k views

C# - mshtml and SHDocVw Complete Documentation

I'm not sure if this is a valid question here but I am having a hard time finding proper documentation for these 2 DLLs, mshtml and SHDocVw. I'm trying to do some automation using these 2 DLLs. To ...
1 vote
1 answer
224 views

Web Elements Captuing using mshtml and shdocview vb.net/C#

I want to design a WPF page where we can capture web screen elements. This should work something similar to IE F12(DOM Explorer) select element option. Can anybody please suggest where to start. ...
user avatar
1 vote
0 answers
575 views

Native Image of Microsoft.mshtml referencing IL assembly cannot be loaded

Problem I have a WPF Application that is referencing Microsoft.mshtml Primary Interop Assembly. I'm creating a native image of my app using NGen. I'm afraid the native image is never being loaded if ...
  • 31
1 vote
0 answers
460 views

How to invoke onchange, onblur events of a DOM element inside WPF WebBrowser

I've tried a lot to find a solution of invoking DOM events of the loaded document of WPF WebBrowser. Here's a code to invoke click event- mshtml.IHTMLDocument2 htmlDoc = webBrowser.Document as mshtml....
0 votes
1 answer
3k views

How can I close the newly opened Internet Explorer using the mshtml (c# code)

I want to close a newly opened internet Explorer window using the mshtml (c# code). I used the Mshtml with the instance of Ie and navigated through a url and clicked on a link. Once i click the ...
0 votes
1 answer
214 views

Could not load file or assembly microsoft.mshtml in Telerik Reporting

I'm using Telrik Reporting and after opened the trdp file in order to modify it , when I select a bloc section to edit it , I got this error : Note: I have already added Microsoft.mshtml in Visual ...
user avatar
0 votes
1 answer
593 views

mshtml.IHTMLElement getAttribute erratic behaviour

In an application, I am using mshtml.IHTMLElement.getAttribute(mimetype) to extract the mimetype within a mshtml.HTMLDocument. Example: www.mywebsite.com/index.html. This webpage has 1 mimetype, and ...
0 votes
1 answer
2k views

Why is the type of mshtml.htmldocument.body.all is just object?

say dw1 is a variable whose type is msthml.htmldocument dw1.all type is mshtml.ihtmlelementcollection However, dw1.body.all type is object. Why is it so? To be more blunt. Why is the type of dw1....
  • 31.9k
0 votes
1 answer
463 views

Unable to read table row using MSHTML object

I am developing a Windows application using C# in which I have used an MSHTML object to read the table rows from the DOM (HTML). The table has THead and TBody tags and inside them a <TR> tag. ...
0 votes
1 answer
940 views

How to get image size on random page using C# with MSHTML?

I am trying to retrieve images on the page using mshtml. Working on 2 different machines (both Win7-64 bit) gives me different results. One of the machines works just fine. The second one, though, is ...
  • 2,129
0 votes
0 answers
12 views

How to access the inner DOM document from Selenium Webdriver?

I've been having a lot of problems using Selenium Webdriver and I've given up using it. When I access a page with 11600 lines, it stops responding to commands like "FindElement". I would ...
0 votes
0 answers
25 views

MSHTML.DLL default printer

I am trying to execute MSHTML.dll in windows 10 to print html file via Shell Execute. But it always gives popup to choose printer. Is there a way to avoid this or is it standard behavior. Is there any ...
0 votes
0 answers
26 views

How to initiate click method td element using XPATH, Imports SHDocVw, Imports mshtml,

The web element is a table. I manage to get the data inside of it but clicking it is not working. Tried changing the class but it doesn't work. I already got the XPATH it's just that I'm not familiar ...
  • 1
0 votes
0 answers
53 views

How to click td element using XPATH, Imports mshtml, Imports SHDocVw

I have a problem with my code, the web element is a table. I manage to get the data inside of it but clicking it is not working. Tried changing the class but it doesn't work. I already got the XPATH ...
  • 1
0 votes
0 answers
864 views

Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'

trying to attach to an IE browser.. it works for awhile then starts throwing this error... --------------------------- --------------------------- Unable to cast COM object of type 'System....
0 votes
1 answer
174 views

InvalidCastException when reading mshtml.HTMLDocument.Script property

Trying to read the mshtml.HTMLDocument property results in the following exception: An unhandled exception of type 'System.InvalidCastException' occurred in mscorlib.dll Additional information: ...
0 votes
0 answers
170 views

C#/MSHTML - HTMLInputElement click() method is stuck in an infinite loop when using on an input element of type "file"

I am using MSHTML in automation IE. One of my requirements is to upload a file, and I am able to click the Browse button using the click() method HTMLInputElement. However, after calling click(), the ...
0 votes
0 answers
133 views

Getting the content of specific tab using mshtml controls in C#

<UL CLASS="littletab"> <LI CLASS="littletabitem" ID="forwardTo1"> <A HREF="javascript:void(0)">Section 1</A> </LI> <LI CLASS="littletabitem is-current"> ...
0 votes
1 answer
59 views

How to access a dynamic control in mshtml created through javascript

How to access a dynamic control in mshtml created through javascript. I have a Yes/No radio button. On selecting Yes, a textbox is dynamically created and added next to this radio button. I am able ...
0 votes
1 answer
652 views

MSHTML &nbsp; appear on editing

I want to add another MSHTML question. Thanks to all responses. We use in Delphi the standard TWebbrowser component, that uses mshtml.dll internally. Additionaly we use the registry to ensure that ...
  • 181
0 votes
1 answer
352 views

Need MsHtml update for new Internet Explorer versions

Since Internet Explorer 9 there is a new interface IDOMDocumentType (http://msdn.microsoft.com/en-us/library/ff975983%28v=vs.85%29.aspx). These interfaces are declared in mshtml.h. But I have Visual ...
  • 7,372
0 votes
1 answer
648 views

Include post variables in a createDocumentFromUrl call in .NET

I have a project in Visual Basic 2010 Express that parses web pages use the IHTMLDocument object. Here is the function I am using to retrieve a web page: Private Function GetHTML(ByVal url As String)...
  • 3,573
0 votes
0 answers
1k views

"mshtml.HTMLWindow2Class.document " throws System.UnAuthorizedAccessException.

I am using mshtml.HTMLWindow2Class.document property to check the state of the web page. But I kept get the following exception: System.UnAuthorizedAccessException. Anybody know how to fix it? I ...
  • 60.5k