开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜