tags:

views:

71

answers:

2

Hi,

I want to take a snapshot of a website so i have to calculate height of a website. I want to use this value in:

Dim MyBrowser As New WebBrowser
MyBrowser.Size = New Size(1027, ???)

Thanks...

A: 

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.

N30
thanks N30 but i prefer "WebBrowser1.Document.Body.ScrollRectangle.Height"
zafiyet
A: 

Try the following.

Dim docWidth as Integer 
Dim docHeight as Integer

docHeight = WebBrowser1.Document.Body.ScrollRectangle.Height
docWidth = WebBrowser1.Document.Body.ScrollRectangle.Width
brad.huffman
thanks brad, it is usefull for me...
zafiyet