how to connect to an open window of internet explorer using c#? -


Can you use COM / OLE in the C # program to connect to Internet Explorer instances?

Ideally I want to open the URLs of all webpages in IE.

I got the answer and the code is excerpt:

  the public class form 1: System Windows .form. Form (steady private SHDOCV, Shellwinds shellwindows = new SHDCov, Shellwondoslas (); Public form 1 () {Initialization (foreign exchange) (Foreign currency (SHDocVw.InternetExplorer i.e. in shellWindows) {message box shows ("i.e. location:" ie i.e. location URL); Ie.BeforeNavigate2 + = New SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler (this.ie_BeforeNavigate2);}} Public Zero ie_BeforeNavigate2 (object pdisp, ref object url, ref object flag, ref object object TargetFrameName, ref object postdata, ref object header, If the bill is canceled) {MessageBox.Show ("Received Event!")}}  

Anyone know that the code on that webpage will also work with IE 6? Tested on. Thanks!


Comments