关于TabStrip下的“确定 取消 应用”
Private Sub Form_Load()
Dim i As Integer
'初始化每一个 tab page
tabSetting.Tabs(1).Caption = "基本设置"
tabSetting.Tabs.Add , , "短信设置"
tabSetting.Tabs.Add , , "照片服务器"
tabSetting.Tabs(1).Selected = True
'初始化三个frame大小以匹配tab控件
For i = 0 To 2
fraSetting(i).Width = tabSetting.ClientWidth 'tab内部宽度
fraSetting(i).Height = tabSetting.ClientHeight 'tab内部高度
fraSetting(i).Left = tabSetting.ClientLeft 'tab内部左间柜
fraSetting(i).Top = tabSetting.ClientTop 'tab内部顶部间拒
fraSetting(i).Visible = False
Next i
fraSetting(tabSetting.SelectedItem.Index - 1).Visible = True '把被选中的tab对应的frame显示出来
End Sub
Private Sub tabSetting_Click()
Call frame_visible_false
fraSetting(tabSetting.SelectedItem.Index - 1).Caption = tabSetting.SelectedItem.Caption
fraSetting(tabSetting.SelectedItem.Index - 1).Visible = True '把被选中的tab对应的frame显示出来
End Sub
'默认先把所有frame控件隐藏起来
Private Sub frame_visible_false()
Dim i As Integer
For i = 0 To 2
fraSetting(i).Visible = False
Next i
End Sub