3
Answers

how to set the size of a webbrowser control dynamically

Klaus

Klaus

16y
12.5k
1
 

Hi,

i have a windows form containing a webBrowser control. I set the content of the webbrowser control dynamically by  webBrowser.DocumentText = sb.ToString();.

The content is a html table that can have a diffrent size (width and hight). I want now that the html content fit in exactly the webbrowser control and the webbrowser should exactly fit in the form. There should be no scrollbars visible. Can i somehow get the width and height of the html content to set the size of the webbrowser control and the form ?

Any help is appreciated

Answers (3)