Add-in window appears behind the main window in Internet Explorer


In Internet Explorer 9 and later versions, when an add-in creates a window, the window might be positioned behind the main browser window. This issue occurs when you navigate to a webpage from the address bar.


An architectural change in the address bar was introduced in Internet Explorer 9. The change establishes focus and foreground presence when web content loads completely.

More Information

Windows that are provided by an Internet Explorer add-in can share the same message input queue as the primary Internet Explorer window. In such scenarios, any component can use the SetWindowsPos API to change the z-index order and request that its window be brought to the foreground.  

To make sure that an add-in window is always positioned in front of the primary Internet Explorer window, the add-in window must designate its owner as the IEFrame window.

For more information about programmatic window management, see the following Microsoft Developer Network (MSDN) documentation:

Article ID: 3109244 - Last Review: Nov 10, 2015 - Revision: 1