[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

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.
0
Kitsune
Asked:
Kitsune
1 Solution
 
zzzzzoocCommented:
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now