Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding New Tab

Status
Not open for further replies.

scottsanpedro

Programmer
Apr 26, 2002
97
0
0
GB
Hi,
Just getting my head around stuff.
I have a small vb.net app. I want to be able to add a new tabpage like so;
Code:
Dim strTitle As String
        strTitle = InputBox("Please enter the title for the page", General.ConTitle)
        Me.TabControlMain.TabPages.Add(strTitle)
When I close down the app and re-open it has disappeared!
Do I need to run this against a database for something like that.
Sorry might be a really stupid question!
Thanks
Scott
 
You need to store & retrive the details of the tab in the registry/settings/database/ini file etc.

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Cheers ZmrAbdulla,

I used the my.settings to put the ref in there.

Used the on_load event
Code:
Dim ReturnValue As String()

        If Len(My.Settings.TabName) > 1 Then
            ReturnValue = Split(My.Settings.TabName, ",")
            For Each Str As String In ReturnValue
                Me.TabControlMain.TabPages.Add(Str)
            Next
        End If

Many thanks

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top