Dreams are renewable. No matter what our age or condition, there are still untapped possibilities within us and new beauty waiting to be born.

-Dale Turner-

Kamis, 04 April 2013

# Control Hide and Show Tabpage in the TabControl (“Example Tabpage2”) For Vb.net 2008



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