How to add TextBox to a form (WinForms) in runtime in VB.NET

1 Answer

0 votes
Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim tb As New TextBox
        Static pos As Integer = 10

        tb.Top = pos
        Me.Controls.Add(tb)
        pos += 30

    End Sub

End Class


answered Feb 6, 2015 by avibootz
...