111,096
社区成员




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 );
}
IntPtr hwndIE =FindWindow("IEFrame",null);
IntPtr hwndWorker = FindWindowEx(new HandleRef(this,hwndIE),new HandleRef(this,IntPtr.Zero), "WorkerW",null);
IntPtr hwndToolbar = FindWindowEx(new HandleRef(this,hwndWorker),new HandleRef(this,IntPtr.Zero), "ReBarWindow32",null);
IntPtr hwndComboboxex = FindWindowEx(new HandleRef(this,hwndToolbar), new HandleRef(this,IntPtr.Zero), "ComboBoxEx32",null);
StringBuilder sb = new StringBuilder(1024);
const int WM_GETTEXT=0x000D;
SendMessage(hwndComboboxex,WM_GETTEXT,sb.Capacity,sb);