user404
user404

Reputation: 266

How to handle multiple tabs in internet explorer with the IWebBrowserApp com interface?

I am using the following code (C#) based on the IWebBrowserApp com interface to find the Internet explorer window that matches the page I am trying to find, based on the title of the page.

I works fine if the page is on the first tab, but it does not work if its a later tab. So how do I get access to the tabs in internet explorer?

              objSW = new ShellWindows();

             IEnumerator ie = objSW.GetEnumerator();

            while (ie.MoveNext())

            {

                obj = ie.Current;

                 app = (IWebBrowserApp)ie.Current;
                    System.Object docObj = app.Document;

                    HTMLDocumentClass hdoc = (HTMLDocumentClass)docObj;

                    if (hdoc.title.Contains(title)) matches.Add(app.HWND, app);
                              //do something

}

Upvotes: 0

Views: 997

Answers (1)

EricLaw
EricLaw

Reputation: 57095

Sorry, but there's no supported API for tab enumeration/manipulation in IE9 or earlier.

Upvotes: 2

Related Questions