起初想用CommandStateChange试试是否能实现这个功能,结果最后放弃,似乎它只支持单窗口的,于是只能用笨办法,添加变量记录数据,然后去判定是否可以允许后退或者前进
If currectpage(activepage) = lastpage(activepage) Then GoTo aaa
Picture5.Picture = Picture24.Picture
On Error GoTo aaa
WebBrowser1(activepage).GoForward
currectpage(activepage) = currectpage(activepage) + 1
add_page = 1
If currectpage(activepage) > 1 Then Picture4.Picture = Picture19.Picture
If currectpage(activepage) = lastpage(activepage) Then Picture5.Picture = Picture40.Picture
aaa:
Exit Sub