You must have access to the size of the WebBrowser document and get its size through WebBrowser.Document.Window.Size.
I would use the WebBrowser Controls DocumentCompleted event to wait for the page to load, and then use the resize code to resize the webControl container with that size.
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted WebBrowser1.Size = WebBrowser1.Document.Body.ScrollRectangle.Size End Sub
source share