I'm accessing my Internet Explorer window with a valid handler (hWnd) like this:
lngMsg = RegisterWindowMessage("WM_HTML_GETOBJECT"); if (lngMsg != 0) { SendMessageTimeout(hWnd, lngMsg, 0, 0, SMTO_ABORTIFHUNG, 1000, out lRes); if (!(bool)(lRes == 0)) { int hr = ObjectFromLresult(lRes, ref IID_IHTMLDocument2, 0, ref document); } }
While accessing the window as is it works as expected and I get an object of type IHTMLDocument2 with the window document. But if I open the developers console, it seems that the console overlaps the main window.
For instance, the url of the document will be "res://C:\\WINDOWS\\SYSTEM32\\F12\\F12Script.dll/23/console/console.html", the title will match the title of the selected tab, etc.
Is there a way to access the window itself and not the debugger?