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

Internet Explorer Automation: how to suppress Open/Save dialog?

When controlling IE instance via MSHTML, how to suppress Open/Save dialogs for non-HTML content? I need to get data from another system and import it into our one. Due to budget constraints no development (e.g. WS) can be done on the other side for…
Vladimir Dyuzhev
  • 18,130
  • 10
  • 48
  • 62
4
votes
1 answer

How to get custom event parameters in a TWebBrowser IDispatchEvent

I was attempting to create some kind of two way communication between Javascript and my TWebBrowser. In my first iteration I was able to register property change events so that when a tag changes, Delphi picks up the change and then reads the value…
Matt
  • 151
  • 1
  • 5
4
votes
1 answer

.net document write with mshtml

I am using mshtml for html parsing. (version 7.0.3300.0, C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll). HTMLDocumentClass have a write method so i used it but it raises ComException with ErrorCode:-2147352571 and…
lockedscope
  • 965
  • 17
  • 45
4
votes
1 answer

Using MSHTML for the GUI in C++, is there perhaps a tutorial?

I would like to migrate my app to using MHTML for the GUI since it would be much easier to experiment with layouts without rewriting the C++ every time. What I found is unfortunately not what I need, which are: Feed it HTML from memory Receive…
user9665
  • 395
  • 1
  • 3
  • 7
4
votes
2 answers

Manipulating HTML document before displaying into WPF WebBrowser control

I have to change inner html code before showing it in the WebBrowser. Test page - http://aksmod.ru/skajrim-mod-kukri-ot-aksyonov-v5-0/ I tried to use AngleSharp.Scripting but it doesn't work correctly (the ads doesn't load) var config = new…
Ev_Hyper
  • 183
  • 8
4
votes
1 answer

Late bind an IHTML element

I'm trying to create a late bound VBA project to search the web. At one point I have the following code (early bound): Dim currPage as HTMLDocument: Set currPage = objIE.document 'where objIE is set with Set objIE =…
Greedo
  • 4,967
  • 2
  • 30
  • 78
4
votes
1 answer

Detect scroll on a WebBrowser control

I have the following code that, weirdly, works for a couple of seconds and then stops working (my event handler method stops being called): public partial class Form1 : Form { private void Form1_Load(object sender, EventArgs e) { …
Juan
  • 15,274
  • 23
  • 105
  • 187
4
votes
1 answer

HTMLBody Workaround For OlAppointment Object?

I am working on a project that links outlook meetings and appointments from an Outlook calendar to a formatted Excel spreadsheet. I am able to pull the outlook appointments/meetings without issue using VBA. That being said, when the events are…
Michael
  • 57
  • 1
  • 4
4
votes
0 answers

Using EdgeHTML instead of MSHTML

We have developed a Windows Desktop HTML/XSL editing application, written in C++ using MFC/ATL/COM technologies, relying heavily on MSHTML's IHTML* COM interfaces, like IHTMLElementPtr, IHTMLDocumentPtr, IWebBrowser2, and so on, making it easy for…
MrTo
  • 41
  • 4
4
votes
1 answer

Which object does WPF WebBrowser.Document property actually return?

From the MSDN the return type is just "object". But this object returned could be cast-ed to mshtml.HTMLDocument if you want to manipulate the elements, or the very same object could be cast-ed to (mshtml.HTMLDocumentEvents2_Event) if you want to…
palazzo train
  • 3,229
  • 1
  • 19
  • 40
4
votes
2 answers

Do the new NoPIA and Type Equivalence features in C#/.NET 4.0 mean Microsoft.mshtml.dll is no longer needed

I'm maintaining a WPF based application which contains a WinForms based WebBrowser control that based on the IE web browser control. When we deploy, we have had to also supply Microsoft.mshtml.dll and do some custom configuration stuff for our…
jpierson
  • 16,435
  • 14
  • 105
  • 149
4
votes
1 answer

MSHTML PasteHTML() produces  

We use in Delphi the standard TWebbrowser component, that uses mshtml.dll internally. Additionaly we use the registry to ensure that the pages renders with the new rendering engine (Web-Browser-Control-Specifying-the-IE-Version, MSDN:…
elite
  • 191
  • 2
  • 13
4
votes
1 answer

C# BHO return value from Javascript

I have a C# BHO which calls some JS functions in a document. Normally I did it like this (and everything worked fine): IHTMLWindow2 wnd; //... wnd.execScript("testMethod(\"testData\");"); But now I need to return value from JS method to my BHO. I…
Oleg
  • 591
  • 4
  • 15
4
votes
2 answers

Is there any way to reference the system fonts and colors in Internet Explorer from HTML, CSS or MSHTML interfaces?

I want to do something like this: Are there any Microsoft-specific CSS…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
4
votes
1 answer

DocumentComplete event in Embedded IWebBrowser2 using write() method

I've been looking hard for this but still have not found any solution. I'm using native win32 c++ (no MFC, ATL or .NET) I'm loading an html document with IHTMLDocument2->write(). I would like to get the event when the page is ready to show, meaning…
Miquel
  • 8,339
  • 11
  • 59
  • 82