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

Saving webpage content using webbrowser IHTMLDocument interface

We need to save the complete web page including img, javascript, css and html using ATL webbrowser (IHTMLDocument) control, using IHTMLDocument2::get_all() method we have saved .html file but now how do we get external files such as .css,…
Ramanand Bhat
  • 183
  • 2
  • 5
  • 22
0
votes
0 answers

Get element name when click on the webBrowser

I want to get element name and pass it to c# when user click on the element. How can I do it? I can get the element with doc.all but I need to do it when user click on the element.
Hamed Khosravi
  • 535
  • 7
  • 21
0
votes
1 answer

C# - Download picture loaded by mshtml

I have to get avatar picture from a website without ask credentials to user of my app. Just one pre-requisites, user memorize his credentials in Internet Explorer before running app. So, I open an Internet Explorer and navigate using mshtml and…
0
votes
1 answer

WPF Browser Control Context menu commands disable

Is there any way to remove or disable only one particular command say"View Page Source" when the page is displayed in the Web forms Webbrowser control. Most of the sources I find is disabling the complete right click context menu. But I would just…
Darey
  • 497
  • 4
  • 24
0
votes
2 answers

Could not load file or assembly 'Microsoft.mshtml

I have just published my asp.net web application in vs2008 THe first page displays nicely but pressing the submit button to get to the next page triggers: Could not load file or assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral,…
Lilz
  • 4,013
  • 13
  • 61
  • 95
0
votes
1 answer

IHTMLDocument2 wait until loaded after click

I have a method which automates logging onto a website based on the authentication's input names, their values, and clicking on the "login" button. Once logged in, I want to navigate to a page that requires that authentication. I have tried this…
Mike Richards
  • 939
  • 3
  • 14
  • 23
0
votes
2 answers

Using different versions of MSHTML in C#

Is there any way to force a C# application to use a specific version of the MSHTML DLL? I'm trying to write an application that uses the different versions of the IE rendering engine to help web designers test their creations for backwards…
Jon
  • 12,684
  • 4
  • 31
  • 44
0
votes
2 answers

Make DOM element effectively read-only

I'm writing a .NET forms control to edit HTML using MSHTML. I am creating some custom elements and want to make them effectively read-only. I thought I could go about this by focusing on the entire element any time focus entered anywhere in that…
dmo
  • 3,993
  • 6
  • 35
  • 39
0
votes
2 answers

MSHTML MFC Tutorial

I know this has been asked twice before but both had no proper replies and are dated so in case someone has found something in these days, I'm asking again!. Any one knows any good tutorial for MSHTML or some open source project which can be read to…
DexTer
  • 2,043
  • 1
  • 22
  • 45
0
votes
0 answers

c# mshtml editor. Text not breaking and keeping going to right

I created a simple html editor using the IHTMLDocument2 web-browser control. My problem is, when I start typing in the web browser control, it keeps going on the same line. I have this code HTMLEditor.DocumentText = ""; doc =…
Vic85
  • 73
  • 9
0
votes
1 answer

Assign a File Path to WBC Web Page Input

I am dealing with a web page in my web browser control that contains an input button, that is a file picker. File Name
Jason Bayldon
  • 1,296
  • 6
  • 24
  • 41
0
votes
1 answer

How to use HTMLElement class in C/C++ code

We have been using IHTMLElement and IHTMLElement2 scripting interface to access web objects and its properties. Right now we are in a situation, want to know the client area occupied by the element, minus any area taken by borders and scroll bars. I…
prakashjv
  • 329
  • 2
  • 8
  • 16
0
votes
0 answers

c# mshtml on webbrowser winforms

I need to intercept the textbox click on the DOM in webbrowser control in c#. I searched a lot in the internet and I learned to use mshtml.dll. Includes it in the project and this is my example: mshtml.HTMLDocument doc; doc =…
BlackShawarna
  • 247
  • 8
  • 23
0
votes
2 answers

Get href from html using mshtml in C#

I am trying to get the href link out of the following HTML code using mshtml in C# (WPF).
Rhys Towey
  • 2,355
  • 1
  • 24
  • 35
0
votes
2 answers

URL Moniker Examples for C# (IMoniker)

I am trying to implement an URL Moniker for MSHTML that will be used to provide images from a storage (in the application) to the HTML Edit control. I have understood that to do this I must implement the IMoniker interface. I have not found any…
Ludvig A. Norin
  • 5,115
  • 7
  • 30
  • 34