How can i calculate height of a website?
I want to take a snapshot of a website so i have to calculate height of a w开发者_StackOverflow社区ebsite. I want to use this value in:
Dim MyBrowser As New WebBrowser
MyBrowser.Size = New Size(1027, ???)
Thanks...
Try the following.
Dim docWidth as Integer
Dim docHeight as Integer
docHeight = WebBrowser1.Document.Body.ScrollRectangle.Height
docWidth = WebBrowser1.Document.Body.ScrollRectangle.Width
when you said height of a website.. did you mean height of a browser window or the the whole document ?
By height of a website if you meant any of the above, you can take a look into this and get the value of height( browser/document) and send that back to server.
精彩评论