如题

解决方案 »

  1.   

    使用 
    System.Diagnostics.Process[] _List = System.Diagnostics.Process.GetProcessesByName("iexplore"); 然后用 
    [DllImport("user32.dll")] 
            public static extern int EnumChildWindows(IntPtr hWndParent, EnumWindowsProc ewp, int lParam); 
    获取到地址栏 就可以了 
      

  2.   

     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);