Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

webbrowser control scrolling

Status
Not open for further replies.

rvBasic

Programmer
Oct 22, 2000
414
BE
I have a Form (Form1) that just contains a Webbrowser control (wb)

The following code is put in the form's Load event
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        wb.ScrollBarsEnabled = True
        wb.GoHome()
    End Sub

Upon running the code, the requested page is loaded into the browser. Unfortunately, scrolling does not seem to work: neither with the scroll bars, nor with the mouse's scroll wheel.

The operation terminates with an error message that basically states:
This property or Method is not supported by this object

What am I supposed to do?

_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Problem seems to be solved by adding the ScriptErrorsSuppressed property:
Code:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        wb.ScrollBarsEnabled = True
        [COLOR=blue]wb.ScriptErrorsSuppressed = True[/color]
        wb.GoHome()
    End Sub

_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top