Public Sub NewTab(URL As Variant)
'我这里Load 新的Index为1的。当然,这个是无法实现打开很多"选项卡"的
'如何去确定这些要Load的Index呢,自己想吧。实在不行的再发邮件问我
Load TPicture(1)
Load WPIcture(1)
Load Label1(1)
Load WB(1)
'下面使旧的"选项卡看不见
WPIcture(0).Visible = False
TPicture(0).BackColor = &H808080 '改变背景色让用户明白区分哪个是没有选项卡是失去焦点的
'当然你也可以像我那样用一幅图作背景,这样效果特棒
'设置新的"选项卡
TPicture(1).Move TPicture(0).Width, 0
TPicture(1).Visible = True
Set Label1(1).Container = TPicture(1)
Label1(1).Move (TPicture(1).Width - Label1(1).Width) / 2, (TPicture(1).Height - Label1(1).Width) / 2
Label1(1).Visible = True
WPIcture(1).Move 0, TPicture(1).Height
WPIcture(1).Visible = True
WB(1).Navigate URL 'Webbrowser转到上面的参数URL
Set WB(1).Container = WPIcture(1)
WB(1).Move -20, -20, WPIcture(1).Width + 40, WPIcture(1).Height + 40 '把WB放到Picture容器里的作用是,去掉WB打开网页时出现凹入的3D效果
WB(1).Visible = True
End Sub