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
2 answers

IHTMLElementCollection´s length changes during loop

I have this code which loops over an element's nodes: public static IEnumerable AllElements(this IHTMLDOMNode node) { if (node.IsHTMLElement()) { IHTMLElement element = (IHTMLElement)node; IHTMLElementCollection…
Juan
  • 15,274
  • 23
  • 105
  • 187
0
votes
2 answers

VB.NET / C#.Net MSHTML: Unable to get "name" attribute from Outerhtml after using "setAttribute('name',value)" for certain elements

I am developing a WYSIWYG application specifically for my company usage with custom integration with company's existing tools. I was unable to get the "name" attribute out of certain elements when trying to get the html string by using ".OuterHtml",…
Aiden Cow
  • 1
  • 4
0
votes
2 answers

c# webbrowser control displaying "special folder" contents : why are Document and DocumentDom always null?

In a C# WinForms, .NET Framework 3.5, project with a WebBrower control on the form : ... with a project reference set to MSHTMLdll and the WinForm code : "using mshtml;" ... you can load a "special folder," like the Favorites folder, into the…
BillW
  • 3,415
  • 4
  • 27
  • 46
0
votes
1 answer

Add link to InnerText of WebBrowser control

I am displaying an incoming e-mail in a WebBrowser control. If the email is in HTML, links are clickable and users are able to navigate to the URL quickly in their default browser. If the email is in Plain Text, however, I'm simply setting the…
Alex
  • 68
  • 1
  • 11
0
votes
1 answer

IViewObjectPresentSite::CreateSurfacePresenter fails in WebBrowser control

My ActiveX control calls IE9's CreateSurfacePresenter to get an ISurfacePresenter interface. I use it to render to a d3d surface exposed by the IE9 (or higher) browser, and thus achieve hardware-accelerated overlay blending. Some…
0
votes
0 answers

VB.NET mshtml library causing "Access is denied" (0x80070005) Or "Object reference not set..." errors

I am using the mshtml library inside a VB.NET console application to extract some data from an http request. The code is as follows: Dim htmlDocument As IHTMLDocument2 For i As Integer = 0 To 10 searchHtml = getHtml(url) htmlDocument = New…
AGB
  • 2,378
  • 21
  • 37
0
votes
1 answer

Microsoft Equivalent of WebkitGTK hovering-over-link signal

I need to add ability to catch event each time there is mouse hover event both on Linux and Windows. In Linux I easily connect to hovering-over-link signal. I cannot seem to find Windows equivalent. Searched google, checked the MSDN, I could not…
Stefano Mtangoo
  • 6,017
  • 6
  • 47
  • 93
0
votes
1 answer

Check return value when using MSHTML in C#

I am trying to use MSHTML in my C# application (BHO). In particular I want to use IMarkupPointer.findText method. This method searches for text and I want to check if text was found or not. When doing this in C++, I just did like this: HRESULT hr =…
Oleg
  • 591
  • 4
  • 15
0
votes
1 answer

how to enlist the module of any exe attached to debugger

I'm actually debugging the IE and want to enlist all the module. My preference is all function contain in MSHTML.dll , but I'm not able to do that. Things done by me as follow:- I've attached debugger to IE and then typed the following command x…
Hemant
  • 1,313
  • 17
  • 30
0
votes
1 answer

How can I create an IHTMLWindow2 object of a certain size?

I am able to create a document and window using the mshtml library in C#. But when I do this the window appears to have a height and width of 0. I can use window.open("about:blank", null, "height=1000,width=1000") but then it actually pops open a…
justin.m.chase
  • 13,061
  • 8
  • 52
  • 100
0
votes
2 answers

How to get the html string exactly like IE renders it?

I am having some problem to get the exactly same HTML string as rendered by IE10. There're some slight difference between the one rendered by IE 10, and the one I retrieved with WebClient.DownloadString(url). (see this question) How to get the…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
0
votes
1 answer

How to get IViewObjectPresentSite from web browser control or document

IViewObjectPresentSite is part of MSHTML(IE9?) according to http://msdn.microsoft.com/en-us/library/jj206442(v=vs.85).aspx. I am trying to run QueryInterface for IID_IViewObjectPresentSite on webBrowser2 object (received by querying…
vinkaga
  • 83
  • 1
  • 6
0
votes
1 answer

Getting an iframe document object via c#

I have this code snippet that needs to retrieve the document object of an iframe and save it in an object. //just a wrapper object to store the document object DocObj obj = new DocObj(HtmlDoc); ManualResetEvent aDoneEvents = new…
Yengibar
  • 31
  • 1
  • 3
0
votes
0 answers

InvokeMember of IHTMLDocument's Script throwing an access violation exception

The following code throws an access violation exception ONLY after publishing as a ClickOnce application and installed. The error doesn't occur if running it from Visual Studio even if I'm on release mode: public static object InvokeScript(this…
Juan
  • 15,274
  • 23
  • 105
  • 187
0
votes
1 answer

Accessing JavaScript Objects from vb.net

I'm working on a vb.net application that interacts with a (third party provided) web app to provide additional functionality (e.g. removing menu items, pulling information from the pages, etc.). The web app is completely driven by javascript but is…
1 2 3
29
30