Home > Software engineering >  VB6 webbrowser how to control the scroll bar to scroll up and down
VB6 webbrowser how to control the scroll bar to scroll up and down

Time:10-11

As title, have an existing website, I wrapped the VB, using the webbrowser appear inside the scroll bar I think through the button to control the rolling up and down, please everybody to give directions, I am a VB beginner, but there are a few points, please help! thank you

CodePudding user response:

The simplest
SendKeys "{pageup}
"SendKeys "{pagedown}"

CodePudding user response:

Webbrowser1. Document. Window. ScrollTo (320, 1520)

CodePudding user response:

Private Sub Form_Load ()
WebBrowser1. Navigate "http://www.163.com/"
End Sub
Private Sub Command1_Click ()

MsgBox WebBrowser1. Document. Body. Scrollwidth
MsgBox WebBrowser1. Document. Body. Scrollheight
'move to the middle of the window
WebBrowser1. Document. ParentWindow. Scroll WebBrowser1. Document. Body. Scrollwidth/2, WebBrowser1. Document. Body. Scrollheight/2
End Sub

  • Related