Creating a Label in Code [VB.NET VS 2005]

  • Thread starter Thread starter Zim Babwe
  • Start date Start date
Z

Zim Babwe

I have a Windows Form and I would like to place a code generated label on
the form, but would like it in my TabControl. I don't know how to do that.

I have a tab control called TabControl1. It has 2 Tabs, Tab1 and Tab2.

How can I place the label on Tab1


Dim lbltest As New System.Windows.Forms.Label

With lbltest
.AutoSize = True
.Top = 122
.Left = 122
.Text = "Text Goes Here"
.Visible = True
.Font = New System.Drawing.Font("Arial", 10,
FontStyle.Bold)
.BackColor = Color.Transparent
End With
Me.Controls.Add(lbltest)


Thanks alot.
 
Back
Top