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 ?
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