davidst98
asked on
Resize a WebBrowser control based on the Website page
Hi,
Is there a way to resize a WebBrowser control (which in turn will resize a WinForm or WPF Window) based on a default size of a webpage. For example if I click on a link in IE it will bring up a pop with a different size and width then my web browser. I would like to make a quick app that will directly open this pop and will re-size itself to the webpage. I hope this makes sense. Thanks.
David
Is there a way to resize a WebBrowser control (which in turn will resize a WinForm or WPF Window) based on a default size of a webpage. For example if I click on a link in IE it will bring up a pop with a different size and width then my web browser. I would like to make a quick app that will directly open this pop and will re-size itself to the webpage. I hope this makes sense. Thanks.
David
ASKER
Hi Matthew, thanks for the response. I'm a little confused. How do pop web pages are able to change the size of the web browser and also remove menu and toolbars?
David
David
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Take this EE page for example. You may say, I want it to size so I see only the right and left hand navigation with everything else on either side of it cut off.
So there is a "bodyWrapper" id DIV you could size to, but that is encapsulated in other div containers that are set to 100%.
Web pages are designed to size to the browser, not the other way around. If your WebBrowser control is only setup to go to webpages you control you could do it by getting the width/height of a container object on the page.