How to add Label 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 l As New Label
        Static pos As Integer = 10

        l.Top = pos
        l.Text = "label"
        Me.Controls.Add(l)
        pos += 30

    End Sub

End Class


answered Feb 7, 2015 by avibootz
...