Sdílet prostřednictvím


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

Several Windows Forms controls can display images. The image can be an icon that clarifies the purpose of the control, such as a disk icon on a button denoting the Save command. Alternatively, the icon can be a background image to give the control the appearance you want.

Poznámka

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

To set the image displayed by a control

  1. In the Properties window, select the Image or BackgroundImage property of the control, then click the ellipsis button (

    VisualStudioEllipsesButton screenshot

    ) to display the Select Resource dialog box.

  2. Select the image you want to display.

See Also

Reference

FromFile

Image

BackgroundImage

Other Resources

Labeling Individual Windows Forms Controls and Providing Shortcuts to Them