SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();
string filename = "";
foreach ( SHDocVw.InternetExplorer ie in shellWindows )
{
filename = Path.GetFileNameWithoutExtension( ie.FullName ).ToLower();
if ( filename.Equals( "iexplore" ) )
Console.WriteLine( " Web Site : {0}", ie.LocationURL );
}
不过,如何得到当前活动的IE窗口的URL???
不是用ASP.NET,用API来实现.
参考过http://www.cnblogs.com/gleamy_ming/articles/1393287.html,C#通过Win32 API操作IE浏览器--获得IE的URL,不过通过这种方法无法得到数据,因此想请教高手~~~