[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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