Microsoft Visual Studio .NET controls are the graphical tools you use to build the user interface of a VB.Net program. Labels are one of the most frequently used Visual Basic control.
A Label control lets you place descriptive text , where the text does not need to be changed by the user. The Label class is defined in the System.Windows.Forms namespace.
Add a Label control to the form. Click Label in the Toolbox and drag it over the forms Designer and drop it in the desired location.
If you want to change the display text of the Label, you have to set a new text to the Text property of Label.
Label1.Text = "This is my first Label"
You can load Image in Label control , if you want to load an Image in the Lable control you can code like this
Label1.Image = Image.FromFile("C:\testimage.jpg")
The following source code shows how to set some properties of the Label through coding.
- Visual Studio IDE
- How to Create a vb.net Windows Forms Application
- Button Control
- TextBox Control
- ComboBox Control
- ListBox Control
- Checked ListBox Control
- RadioButton Control
- CheckBox Control
- PictureBox Control
- ProgressBar Control
- ScrollBars Control
- DateTimePicker Control
- Treeview Control
- ListView Control
- Menu Control
- MDI Form
- Color Dialog Box
- Font Dialog Box
- OpenFile Dialog Box
- Print Dialog Box
- KeyPress event in VB.NET
- How to create Dynamic Controls in VB.NET ?
- How do i keep a form on top of others
- Timer Control - VB.Net