Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles Button1.Click
        For i As Integer = 0 To 10
            ' Tworzymy nowy przycisk
            Dim Button As New Button
            Button.Text = "Przycisk dynamiczny nr " & String.Format("{0:00}", i)

            ' Dopasowujemy przycisk do szerokości tekstu
            Button.AutoSize = True

            ' Dodajemy przycisk do panelu
            FlowLayoutPanel1.Controls.Add(Button)
        Next
    End Sub

    Private Sub FlowLayoutPanel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles FlowLayoutPanel1.Paint

    End Sub
End Class
