The Label control (System.Windows.Forms.Label) is employed to feature text to a type which will be wont to show messages, or add labels to spot what alternative controls’ practicality is.Drag a label management from the tool case to the shape. By default, it’ll have associate initial text. the subsequent properties ar the foremost common ones that you just can modify.
|AutoSize||If true, the dimensions of the borders of the label management
in the designer are resized mechanically
depending on the text within it.
|BorderStyle||Specifies the type of border around the label.|
|Font||Used to change the font properties of the
text inside the label control.
|Text||The text of the label.|
|TextAlign||The alignment of the text inside the Label control|
The Text property is the most important one because the main purpose of the Label control is to show text in the form.
Label1.Text = "Hello World!";
You can modify the Font property to change the font family, font size and many font properties.
There are events that are also available for the Label control, but most of the time, you won’t be needing them.