How to scroll axWebBrowser

  • Thread starter Thread starter WRH
  • Start date Start date
W

WRH

Hello
For my first C# program I have an axWebBrowser window.
I set it to Navigate to a particular site when the program
starts. Works fine. What I would like to do now, once
the navigation is complete, is to scroll the window to a
particular region. I can trap the NavigateComplete message
but how can I tell the browser to scroll to my area of
interest? Any clues welcome.
 
WRH said:
For my first C# program I have an axWebBrowser window.
I set it to Navigate to a particular site when the program
starts. Works fine. What I would like to do now, once
the navigation is complete, is to scroll the window to a
particular region. I can trap the NavigateComplete message
but how can I tell the browser to scroll to my area of
interest? Any clues welcome.

It depends, if the HTML element you want to scroll to has an id
attribute e.g.
<p id="aParagraph">
then you should simply directly navigate to
page.html#aParagraph
and the browser should scroll there
 
The only way I know to do this would be to pull the actual table out of the
HTML (in other words, interpret the HTML, find and extract the table with
the 5 day forcast), place it in a local HTML file and then display the local
HTML file.

Pete
 
Back
Top