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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top