private void ResizeWindow() { if (webBrowser1.Document != null) { resizableWindow = webBrowser1.Document.Window.OpenNew(new Uri("http://www.microsoft.com/"), ""); resizableWindow.ResizeTo(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); } }