Getting the page height from a WinForms WebBrowser control

后端 未结 2 540
一个人的身影
一个人的身影 2020-12-19 02:55

I\'ve been trying for the last few days to get the height of a web page from the Document property of a WebBrowser control.

Here\'s my latest attempt.

相关标签:
2条回答
  • 2020-12-19 03:32

    This worked for me:

    webBrowser.Document.Body.ScrollRectangle.Height
    
    0 讨论(0)
  • 2020-12-19 03:34

    Find the BODY tag and get the OffsetRectangle.Bottom of that element. This will give you the height of the page.

    0 讨论(0)
提交回复
热议问题