Returns or sets a value that specifies whether an ampersand (&) included in the text of the Caption property of the Label control defines an access key.
object.UseMnemonic [= boolean]
The parts of the UseMnemonic property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
boolean | A Boolean expression specifying whether the Label control enables an access key, as described in Settings. |
The settings for boolean are described in the following table.
Setting | Description |
---|---|
True | (Default). Any ampersand appearing in the text of the Caption property causes the character following the ampersand to become an access key. The ampersand itself is not displayed in the interface of the Label control. |
False | Any ampersand appearing in the text of the Caption property is displayed as an ampersand in the interface of the Label control. |
At run time, pressing ALT+ the access key defined in the Label control's Caption property moves focus to the control that follows the Label control in the tab order.