Maximum scroll value of WebBrowser control

Hi,

I have a VB6 application which is working nicely. I would like to determine the maximum value of both the vertical and horizontal scrollbars of a WebBrowser control programmatically.

Thanks.
LVL 1
KitsuneAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
zzzzzoocConnect With a Mentor Commented:
Perhaps...

Private Sub Form_Load()
    Me.Visible = True
    'Go to site..
    Call WebBrowser1.Navigate("www.yahoo.com")
    'Wait for page to load..
    Do Until TypeName(WebBrowser1.Document) <> "Nothing"
        DoEvents
    Loop
    'MsgBox Height & Width of scrollbars (vert/horz)
    MsgBox WebBrowser1.Document.body.scrollHeight
    MsgBox WebBrowser1.Document.body.scrollWidth
End Sub

0
 
KitsuneAuthor Commented:
It's not quite the maximum value but it is trivial math to work out and works fine for my particular program needs.

Thanks zzzzzooc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.