Label Control in VB.NET


Label control is used to display some text on the form which user can not edit.
However user can edit contents of the label control at run time using text property.
Labels are widely used with form to display text before various controls. So user can easily understand the purpose of controls for which they are placed on the form.
Thus we can say that Labels are used to display some text or Information on the form.

Properties of Label Control in VB.NET


Property Purpose

BackColor

It is used to get or set background color of the label.

Font

It is used to set Font Face, Font Style, Font Size and Effects of the text associated with Label Control.

ForeColor

It is used to get or set Fore color of the text associated with Label Control.

Enabled

It is used to specify weather label control is enabled or not at run time. It has Boolean value. Default value is true.

FlatStyle

It is used to get or set appearance of the Label Control when user moves mouse on it or click on it. It has following 4 options:
System, Popup, Standard, Flat

Image

It is used to specify an image that is displayed in Label Control.

ImageAlign

It is used to get or set alignment of the image that is displayed in the Label control.

Text

It is used to get or set text associated with the Label control.

TextAlign

It is used to get or set alignment of the text associated with the Label control.

Visible

It is used to specify weather label control is visible or not at run time. It has Boolean value. Default value is true.


     

Methods of Label Control in VB.NET



Method Purpose

Show

It is used to show label control at run time.

Hide

It is used to hide label control at run time.


Events of Label Control in VB.NET



Event Purpose

Click

It is the default event of Label Control. It fires each time user clicks on Label Control.

DoubleClick

It fires each time user double clicks on Label Control.

TextChanged

It fires each a text associated with Label Control is changed. 


Download Projects


Download Programs