Solved

Maximum scroll value of WebBrowser control

Posted on 2004-04-12
2
240 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now