private sub command2_click() webbrowser1.document.parentwindow.scrollby 0, 30 end sub
private sub form_load() webbrowser1.navigate "http://www.applevb.com" end sub
点击command2就可以使当前页面向下滚动30像素
2、判断页面是否可以前进后退
private sub command1_click() webbrowser1.goforward end sub
private sub command2_click() webbrowser1.goback end sub
private sub form_load() webbrowser1.navigate "http://www.applevb.com" end sub
private sub webbrowser1_commandstatechange(byval command as long, byval enable as boolean) if (command = csc_navigateback) then command2.enabled = enable end if if (command = csc_navigateforward) then command1.enabled = enable end if end sub