FoxPro Programming
shell.explorer.2 how to scroll down using code
Gravatar is a globally recognized avatar based on your email address. shell.explorer.2 how to scroll down using code
  Abe
  All
  Nov 5, 2019 @ 06:59pm

Hello,

I have searched for hours with no luck in finding the code that will let me scroll to the bottom of a web page that I navigated to using shell.explorer.2 activex. The web page that the end user navigates to is long. The info that is related to the user is at the end of the page. I navigate using Thisform.owB.Navigate(lcUrl) and wait till it is not busy and readystate = 4 and then I could not figure out the code to display / scroll to the bottom of the web page in the IE activex window.

Please any help will be appreciated.

Thank you,

Abe

Gravatar is a globally recognized avatar based on your email address. re: shell.explorer.2 how to scroll down using code
  Rick Strahl
  Abe
  Nov 6, 2019 @ 11:45am

Uh, shell explorer is something different than the Web Browser control. Are you talking about the WebBrowser control?

In the WebBrowser control, once the document is loaded you can use the scrollTop property on the document or body (can't recall which) to set the scroll position. Set it to a very large value and it'll scroll to the end.

loBrowser.Document.Body.scrollTop = 999999

Note this will work in IE 10/11 mode, but may not in older versions (7 is the default) and you may have to force your application to run in IE 11 mode.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: shell.explorer.2 how to scroll down using code
  Abe
  Abe
  Nov 6, 2019 @ 01:32pm

Hi Rick,

I have tried: Thisform.owb.Document.Body.scrollTop = 999999

did not work then I tried:

Thisform.owb.Document.documentElement.scrollTop = 999999

IT WORKED!!!

Thank you so much Rick for all your help through out the years 😃

Best Regards,

Abe

© 1996-2019