Label Control.
The Label control is used to display text to the end user for a control descriptive
instruction. This might be a instruction on a TextBox field as.

The first TextBox is labeled with "First Name". The Second TextBox is labeled with
"Surname". The ComboBox is labeled with "Select Age". This is the typical use of
the label. To label controls and give instructions.
The label can take the form of Text only, Image and Text or Image only.
Namespace: System.Windows.Forms
Assembly: Systems.Windows.Forms.dll
using System.Windows.Forms;
Calling: System.Windows.Forms.Label
Creating a new System.Windows.Forms.Label control.
Label label1 = new Label();
Adding the Label control to a Windows form.
this.Controls.Add(label1);
Assigning text to the Label control.
label1.Text = "DotNet Controls";
|