How to move to a location in a web browser component?
Posted
by Mostafa Mahdieh
on Stack Overflow
See other posts from Stack Overflow
or by Mostafa Mahdieh
Published on 2010-04-26T14:49:35Z
Indexed on
2010/04/26
14:53 UTC
Read the original article
Hit count: 243
I have a .NET windows form page and a WebBrowser component inside. I load a page inside the web browser using the Navigate method as in:
webBrowser1.Navigate("http://www.stackoverflow.com");
The pages length is longer than the browsers height, so the vertical scroll bar appears. Now I want to move the scrollbar down to a specific position.
More specifically I want to search for a specific peace of text inside the page, and scroll to that position.
This behavior is implemented in the built-in "Find" function of the browser, but I can't figure out how to call the Find function from within my code, without the Find window appearing.
Although I don't want the Find window to appear, if the text matches are highlighted it is welcome.
© Stack Overflow or respective owner