Solved

Maximum scroll value of WebBrowser control

Posted on 2004-04-12
2
247 Views
Last Modified: 2010-05-18
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
Comment
Question by:Kitsune
2 Comments
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 125 total points
ID: 10810109
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
 
LVL 1

Author Comment

by:Kitsune
ID: 10820041
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question