想了一个无聊的方法:
获取指定标题窗口的坐标、宽度,计算出关闭按钮的位置,将鼠标指针位置移至关闭按钮,单击,再移回头

解决方案 »

  1.   

    通过FindWindow获取IE,取值 
    [DllImport("User32.dll")] 
            static extern int FindWindow(string lpClassName, string lpWindowName); 
            [DllImport("User32.dll")] 
            static extern int FindWindowEx(int hwndParent, int hwndChildAfter, string lpszClass, string lpszWindow);         public static string GetURL() 
            { 
                int parent = FindWindow("IEFrame", null); 
                int child = FindWindowEx(parent, 0, "", null); 
            }