Answer the question
In order to leave comments, you need to log in
How to change webBrowser height dynamically?
How to adjust the height of the webBrowser according to the content in it?
Yes, I'm aware that you can enable scrolling in it, but you don't have to -__-
Answer the question
In order to leave comments, you need to log in
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
this.Width = webBrowser1.Document.Body.ScrollRectangle.Width;
this.Height = webBrowser1.Document.Body.ScrollRectangle.Height;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question