Dim colRemovedTabs
As New Collection() ‘’Declaration
Dim TabPage2 As TabPage ‘’=è Form Load
TabPage2 = TabControl1.TabPages(2)
colRemovedTabs.Add(TabPage2, TabPage2.Name)
TabControl1.Controls.Remove(TabPage2)
TabControl1.SelectTab(TabPage2) à set focus tabpage
in tabcontrol
----------------------------------------------------
Private Sub
Show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click ‘’=è add Button
Try
TabControl1.Controls.Add(colRemovedTabs("TabPage2"))
colRemovedTabs.Remove(TabPage2.Name)
Catch ex As Exception
End Try
End Sub
0 komentar:
Posting Komentar