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

Handling HTMLSelectElement Event

My code is: Private htmlselReceteAlttur As mshtml.HTMLSelectElement htmlselReceteAlttur = htmlform.item("f:m8") AddHandler htmlselReceteAlttur.onclick, AddressOf htmlselReceteAlttur_onchange Private Function…
0
votes
1 answer

How to determine direction of navigation from IE WebBrowser (IHtmlWindow2 or Javascript)

I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control. So its off to the COM…
Geoff Cox
  • 6,102
  • 2
  • 27
  • 30
0
votes
1 answer

How to access missing/hidden HTMLDocumentEvents4 events (onchange event) or attach event listeners to element

In MSHTML interface HTMLDocumentEvents4 should contain around 30 events (as per msdn page http://msdn.microsoft.com/en-us/library/ff976251(v=vs.85).aspx#events) but only onmssitemodejumplistitemremoved and onmsthumbnailclick are available I want to…
Madhan
  • 5,750
  • 4
  • 28
  • 61
0
votes
1 answer

MSHTML   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 the pages renders with the new rendering engine…
elite
  • 191
  • 2
  • 13
0
votes
2 answers

MSHTML: IHtmlDocument - how to subscribe to custom javascript events

I'm writing an extension for IE in c#. I've got a IWebBrowser2 object called browser and from it I can get an IHtmlDocument2 object like this: var document = browser.Document as IHTMLDocument2; Now I need to react on a javascript event which is…
Artur Udod
  • 4,465
  • 1
  • 29
  • 58
0
votes
1 answer

Unable to click the anchor tags for the second time

I am writing an scraping program. The very first time i am able to click the anchor tags, But once I again loop in the same doesn't happen. I have done this in the Watin instance of IE. I doubt this is because of the back of the IE instance which i…
user2703389
  • 91
  • 1
  • 10
0
votes
1 answer

InvokeMember does not work with WPF Webbrowser

So I am having this issue with automating a webpage. Here's some information: private bool refreshing = true; private mshtml.HTMLDocument bcode; private void browser_LoadCompleted(object sender,…
Vincent
  • 11
  • 4
0
votes
2 answers

How to set entire HTML in MSHTML?

How to set entire HTML in MSHTML? I am trying using this assignment: (Document as IHTMLDocument3).documentElement.innerHTML := 'abc'; but I got the error: "Target element invalid for this operation" I've also tried using (Document as…
Douglas Lise
  • 1,466
  • 1
  • 20
  • 46
0
votes
1 answer

'object' does not contain a definition for 'innerHTML'

I'm using c# mshtml to get html data from a website. public mshtml.HTMLTableRow tr = default(mshtml.HTMLTableRow); //do some stuff tr.cells.item(0).innerHTML it is recognizing "item" as a generic object. This used to work but now it is giving…
Zameer Ansari
  • 28,977
  • 24
  • 140
  • 219
0
votes
1 answer

Pyjamas-desktop (pyjd) compiles, runs and quits

I'm running Pyjamas on Windows 8.1 with Python 2.7 (64-bit). I've struggled a bit with getting everything installed, but I believe the struggle has been fruitful -- I've run bootstrap, the file "run_bootstrap_first_then_pyjd_setup.py", and have…
kgilvi3
  • 305
  • 3
  • 12
0
votes
1 answer

C# webBrowser1.Document - find all elements by class attribute

I'm using webBrowser control in winform app C# FW4.0, and I would like to find all the elements that their class attribute contains some value. Is it possible?
Itay.B
  • 3,991
  • 14
  • 61
  • 96
0
votes
1 answer

How to ignore pages that are not real webpages or contain msgbox with WebBrowser2?

I used System::Net::WebClient::DownloadString to get HTML code of some webpages. But, it doesn't work for some specific pages. For this reason, I used WebBrowser2 for these pages. However, this way has some problems since it really loads pages. I…
Gimun Eom
  • 411
  • 5
  • 17
0
votes
0 answers

IHTMLDocument Events are not working with the COM BrowserControl

I'm trying to automate a website, and I have the following piece of code to change the value of a dropdown (select): private bool ChangeElementSelection(mshtml.IHTMLDocument3 document, string id, string value) { var el =…
pixartist
  • 1,137
  • 2
  • 18
  • 40
0
votes
1 answer

WebBrowser control set Document Mode

So I know about FEATURE_BROWSER_EMULATION, but either it isn't working for me, or it only controls the Browser Mode and not the Document Mode. I have a lot of info specific to my case below, but the general question that I think/hope should have an…
eselk
  • 6,764
  • 7
  • 60
  • 93
0
votes
0 answers

Using C#.NET 4 to read the DOM and click a Submit Image - why, suddenly, do I get an error about casting?

I have some code that has been working for me for several months, but today, I am getting casting errors? I am using the mshtml library to click an adjust input image: mshtml.IHTMLElementCollection objCollection =…
QuietLeni
  • 139
  • 1
  • 3
  • 12