Why SHDocVw.InternetExplorer instance Count in ShellWindows are different?

1.3k views Asked by At

Currently there are no iexplorer process.

When I make two InternetExplorer instances, the ShellWindows gives me only one HWND.

This is my code.

        for (int i = 0; i < 2; i++)
        {
            InternetExplorer ie = new InternetExplorer();
            if (i == 0)
            {
                ie.Navigate("https://stackoverflow.com/");
            }
            else
            {
                ie.Navigate("http://microsoft.com");
            }
            ie.Visible = true;
            int ieHWND1 = ie.HWND;
        }

        SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
        foreach (SHDocVw.InternetExplorer shell in shellWindows)
        {
            int ieHWND2 = shell.HWND;
        }

And One more question.

If there are more than two parent InternetExplorers with several tabs each parent on it, do they have there own HWND to identify which one is which so I can handle it. Because When I test it, all the childs have same parent HWND. I mean, is there even parent and child exist?

Do they have HWND like

No.1 parent - No.1_1 childTab, No.1_2 childTab, No.1_3 childTab

No.2 parent - No.2_1 childTab, No.2_2 childTab, No.2_3 childTab

Any help is greatly appreciated.

0

There are 0 answers