How to retrieve active IE7 tab window's IWebBrowser2 object?

Hi All,

In IE6, when I got an instance of IWebBrowser2, I could judge whether it was active by comparing its hwnd with GetActiveWindow(). But in IE7, I couldn't do it, because IWebBrowser2.get_Hwnd returned handle of its container.

Who can help me



Answer this question

How to retrieve active IE7 tab window's IWebBrowser2 object?

  • R-Cyclone-S

    Thanks, Jeremy. I'll try it.
  • WpfUser

    That events fires for many reasons including minimizing and or restoring. How can you tell if those from tab switching and where is the active tab's ... id ... stored.
    I have a bho that outputs an analysis of the webpage, and as the analysis takes some time, I keep the results, so if the user switches from one tab to another, I just quickly load the analysis results and display them. The problem is that I need some kind of tab ID to be able to tell which stored results to retrieve, and also for storing them.
    If anyone has a small code snippet showing the part of the Invoke method that handles this, please post it, it would be greatly appreciated.

    Thanks

  • asiaindian

    We did not introduce tabbed browsing APIs in IE7, but we offer the DWebBrowserEvents2::WindowStateChanged event to help toolbars and BHOs know whether the browser associated with their toolbar/BHO is visible to the user.

  • NeederOfVBHelp

    Anyway to prevent a new tab from loading an instance of a vert toolbar

  • battlestar 2007

    TabWindowClass windows of activated and inactivated tabs get WM_SHOWWINDOW message. For the activated tab, wparam parameter is TRUE and for inactivated tab, it is FALSE. But you need to subclass TabWindowClass windows of all the tabs.

    Mojo


  • vicky_dceian

    How to retrieve active IE7 tab window's in vb6

    Help me !!


  • How to retrieve active IE7 tab window's IWebBrowser2 object?