please i need help here. i want write code for label control into my application. i wrote the code below, but was not getting the labels when i run the program.
GroupBox.Controls.Clear() Dim lbl1 As Label = New Label() lbl1.AutoSize = True lbl1.BackColor = System.Drawing.SystemColors.Control lbl1.Font = New Font(lbl1.Font.FontFamily, 20) lbl1.ForeColor = System.Drawing.Color.White lbl1.Location = New System.Drawing.Point(419, 134) lbl1.Name = "label1" lbl1.Size = New System.Drawing.Size(65, 23) lbl1.TabIndex = 4 lbl1.Text = " Hello World!!" Dim lbl2 As Label = New Label() lbl2.AutoSize = True lbl2.BackColor = System.Drawing.SystemColors.Control lbl2.Font = New Font(lbl1.Font.FontFamily, 20) lbl2.ForeColor = System.Drawing.Color.White lbl2.Location = New System.Drawing.Point(419, 134) lbl2.Name = "label2" lbl2.Size = New System.Drawing.Size(65, 23) lbl2.TabIndex = 4 lbl2.Text = " Welcome to vb!" GroupBox2.Controls.Add(lbl2)