how to get notified when existing tab is dragged out into a new IE instance...

Add-in Express™ Support Service
That's what is more important than anything else

how to get notified when existing tab is dragged out into a new IE instance...
 
grchen168




Posts: 38
Joined: 2014-09-03
Hello,
An existing IE window has 2 tabs, and, when user drag one of the tab out of the current IE window, then, resulting in making the existing IE window contain only one tab and, in the mean time, creating a new IE window that conatin the dragged tab content.

Question is, by what means (events or properties), I can get notified before and/or after the dragging operation? And how to get to know the "outter" IE main window handle (using ADXIEHelper.GetIEServerWindow(this.ParentHandle) or just MainWindowHandle, or (System.IntPtr)(this.IEApp as IWebBrowser2).HWND?)
(that is, I want to get the IE window,that can conatin many tabs within)
Posted 24 Dec, 2014 17:31:48 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Chen,

You can use the OnTabDockChanged event of the iemodule in order to detect if an IE tab is dragged into another window. To get the IE main window handle (IEFrame) you can use the 'MainWindowHandle' property.
Posted 26 Dec, 2014 09:24:30 Top
grchen168




Posts: 38
Joined: 2014-09-03
As following the original scenario, using OnTabDockChanged event, then, my code can be notified of the dragging operation. Thank you.

But, then, for the original first IE main window, it now remains with only one (the original first) tab. Question is, for that remaining tab, can the tab's associated iemodule know (or how to detect) that it is now becoming the "active" tab for that specific IE main window?

One related question, how to know each IE main windows's active tabs(s)?
Posted 26 Dec, 2014 21:56:31 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Chen,

When a tab is activated, the OnTabActivated event is triggered.
All IE tabs opened within one IE window (IEFrame) have the same MainWindowHandle. So you can use the GetModuleCount and GetModuleByIndex methods to find all tabs with the same main window. if an IE tab is active, the IsTabActive methods return 'true'.
Posted 27 Dec, 2014 08:03:28 Top