Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to: Set the Text Displayed by a Windows Forms Control Using the Designer

Windows Forms controls typically display some text that is related to the primary function of the control. For example, a Button control typically displays a caption that indicates what action will be performed when the button is clicked. For all controls, you can set or return the text by using the Text property. You can change the font by using the Font property.

To set the text and font with the designer

  1. In the Properties window, set the Text property of the control to an appropriate string.

    To create an underlined shortcut key, includes an ampersand (&) before the letter that will be the shortcut key.

  2. In the Properties window, click the ellipsis button (VisualStudioEllipsesButton screenshot) next to the Font property.

    In the standard font dialog box, select the font, font style, size, effects (such as strikeout or underline), and script that you want.

© 2015 Microsoft