Experience in C++, C#, Java and Process : Living in Montreal

* What is my technical experience as a software developer

* What I have learned in the software business

* Where I am heading to in my career

* How to process in a project

Tuesday, December 14, 2004

Use IE as references in C# project

You may need both references:

SHDocVw = Microsoft Internet Controls : the DOM

1. Add references ...
2. Choose COM tab, select Component Name as Microsoft Internet Controls.
3. Done


Mshtml = Microsoft HTML Object Library : The IE core engine
1. Add references ...
2. Select Microsoft.mshtml assembly under the .NET tab.
3. Add

How they work together ?
  • IHTMLDocument (or IHTMLDocument2) interface is defined at mshtml and it must be retrieved from the shdocvw interface
  • SHDocVw.IWebBrowser2 IEHost = (SHDocVw.IWebBrowser2)this.Explorer;
  • mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2) IEHost.Document;

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home