none
How to get newly created child window object in IE C# ShdocVW RRS feed

  • Question

  • Hi,

    I tried using the ShellWindow class to get the list of IE window opened. But it is giving only one window(Parent) not giving the child.

    Help much appreciated,

     Thanks,

    Raja

    Monday, November 25, 2019 9:35 AM

All replies

  • Your question is very vague.

    First, your title says ShdocVW but your question says nothing about ShdocVW. Please put all relevant information into the question. Do not require us to know what is in the title. In my experience, when the question excludes content that is in the title only, the question is too vague to be able to answer.

    Do you mean the ShellWindow (singular) class or the ShellWindows (plural) class? If ShellWindows then note that not all of its objects are IE windows. On the subject of IE the definition of child windows are not clear.



    Sam Hobbs
    SimpleSamples.Info

    Monday, November 25, 2019 8:07 PM
  • If you need tab windows you need to query via IOleWindow


    Visual C++ MVP

    Monday, November 25, 2019 9:16 PM
  • Hi Raja,

    You could refer to the following code to list IE window opened website LocationName:

                SHDocVw.ShellWindows SWs = new SHDocVw.ShellWindows(); 
                //SHDocVw.InternetExplorer IE = default(SHDocVw.InternetExplorer);
    
                listBox1.Items.Clear();
                foreach (SHDocVw.IWebBrowser2 ie in SWs) 
                { 
                    'using a listbox to display the location name.
                    if(ie.FullName.ToLower().Contains("iexplore.exe"))
                        listBox1.Items.Add(ie.LocationName); 
                }
    Don’t forget to reference “Microsoft Internet Controls” Com component in your C# project.

    Tuesday, November 26, 2019 9:59 AM
  • I also have code that I use to get IE windows but we have not heard from RajaPazhanivel clarifying what is needed.



    Sam Hobbs
    SimpleSamples.Info

    Tuesday, November 26, 2019 4:15 PM