Export (0) Print
Expand All

Visual Basic Reference

Visual Studio 6.0

Label Control

See Also    Example    Properties    Methods    Events

A Label control is a graphical control you can use to display text that a user can't change directly.

Syntax

Label

Remarks

You can write code that changes the text displayed by a Label control in response to events at run time. For example, if your application takes a few minutes to commit a change, you can display a processing-status message in a Label. You can also use a Label to identify a control, such as a TextBox control, that doesn't have its own Caption property.

Set the AutoSize and WordWrap properties if you want the Label to properly display variable-length lines or varying numbers of lines.

A Label control can also act as a destination in a DDEconversation. Set the LinkTopic property to establish a link, set the LinkItem property to specify an item for the conversation, and set the LinkMode property to activate the link. When these properties have been set, Visual Basic attempts to initiate the conversation and displays a message if it's unable to do so.

Set the UseMnemonic property to True if you want to define a character in the Caption property of the Label as an access key. When you define an access key in a Label control, the user can press and hold down ALT+ the character you designate to move the focus to the next control in the tab order.

Show:
© 2014 Microsoft