Hi everybody.

I would like to know if its possible do dynamically manipulate the scrolling of a webpage in a WebBrowser control in my Form.

Either by a page loaded event or some other event.

Also if that is possible, can it be done without the control having scrollbars.

I have very little experience with C# and appreciate all and any advice given.

You can use the Broswer.Document.Window.ScrollTo() method to move the view to a point in the webpage. The following code scrolls to the bottom right of the page. You would need to use some logic to determine what point on the page you want to scroll to:

Point p = new Point(webBrowser1.Document.Window.Size);
    webBrowser1.Document.Window.ScrollTo(p);

Edited 6 Years Ago by Geekitygeek: n/a

Thank you for you answer, I am not able to put your advise to the test just yet, but I would just like to aknowledge your reply.

You helped me with this, it worked well, for scrolling to the correct position after a button press.

I'm highly delighted, thank you so much.

I'm currently researching how to have my forms WebBrowser check for page loaded events, and have them trigger the scroll.

I hope you wont mind if I come back with my tail between my legs.

Thank you once again.

Edited 6 Years Ago by Suzie999: n/a

For page loaded you want to check out the DocumentCompleted event, it fires when the webbrowser finishes loading the current page.

This question has already been answered. Start a new discussion instead.