I want to scroll down an Internet Explorer window without using SendKeys.
How could I do that?
regards
alexvb
Printable View
I want to scroll down an Internet Explorer window without using SendKeys.
How could I do that?
regards
alexvb
http://www.thecomputeracademy.com
view the source on the left frame, you will see the javascript info how to do this.
there are 2 different methods to calculate teh height,
1) for IE...
1) for Netscape
but basically the code is :
if (ScrollTo>height){
scrollBy(0,ScrollTo-(height/2));
}
If you need to send a person to a webpage, and have them look at a specific part of the page, you can always use the A NAME tag. (in case you didn't know about that)
Thx, but i've now managed it in my VB program using SendMessage API.
VB Code:
Private Const WM_KEYDOWN = &H100 Private Const WM_KEYUP = &H101 Private Const VK_DOWN = &H28 ... Call SendMessage(hwnd, WM_KEYDOWN, VK_DOWN , ByVal 0&) Call SendMessage(hwnd, WM_KEYUP, VK_DOWN, ByVal 0&)
regards
alexvb
You could send a WM_VSCROLL message instead:
VB Code:
Call SendMessage(hwnd, WM_VSCROLL, SB_PAGEDOWN, ByVal 0&)