>I'm trying to find the URL that is being viewed in an IE window, by using
the PID or the hWnd of the IE window.
Does anyone know how this could be done? or where I should be looking?
If you're only interested in IE it may be better to use the COM APIs
in Shdocvw.dll. If you Tlbimp it you can write code like this to dump
info on all IE (and Windows Explorer) windows.
foreach (InternetExplorer ie in new ShellWindows())
{
Console.WriteLine(ie.HWND);
Console.WriteLine(ie.LocationName);
Console.WriteLine(ie.LocationURL);
}
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
Please reply only to the newsgroup.