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
            ' Create a new button.
            Dim Button As New Button
            Button.Text = "Dynamic Button #" & String.Format("{0:00}", i)

            ' Size the button the width of the text.
            Button.AutoSize = True

            ' Add the button to the layout panel.
            FlowLayoutPanel1.Controls.Add(Button)
        Next


    End Sub
End Class
