I'm trying to add tabpages and controls on the fly. I can't figure out how to add a control to a tabpage. You'll probably want some code:
Code:
Dim InputFile As StreamReader
Dim InputString As String
Dim i, x, y As Integer

InputString = InputFile.ReadLine()
Do Until InputString Is Nothing
    Dim Parts() As String = InputString.Split(",")
    Dim TmpTabPage As New TabPage
    TmpTabPage.Name = Parts(0)
    Me.TabControl1.Controls.Add(TmpTabPage)
    x = 8
    y = 8

    Do Until i = Parts.Length
        Dim TmpLbl As New Label
        TmpLbl.Text = Parts(i)
        TmpLbl.Location = New Point(x,y)
        y = y + 40
        ' ????????????????
    Loop
    InputString = InputFile.ReadLine()
Loop
The question marks is where I'm stuck. I know I need some kind of Controls.Add method, but I can't find which one. Something like Me.TabControl1.??????.Controls.Add(TmpLbl).

Any help?