public static void CloseInternetExplorer() { if (IE != null) { IE.Stop(); IE.Quit(); Win32.SendMessage((IntPtr)IE.HWND, 16, new IntPtr(0), new IntPtr(0)); IE = null; } }