Bagikan melalui


How to: Add or Remove ImageList Images with the Designer

 

You can add images to an ImageList component several different ways. You can add images very quickly by using the smart tag associated with the ImageList, or if you are setting several other properties on the ImageList, you may find it more convenient to add images with the Properties window. You can also add images by using code. For more information about how to add images with code, see How to: Add or Remove Images with the Windows Forms ImageList Component. Typically you populate the ImageList component with images before it is associated with a control, but this is not required.

Note

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 Customizing Development Settings in Visual Studio.

To add or remove images by using the Properties window

  1. Select the ImageList component, or add one to the form.

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

  3. In the Image Collection Editor, click Add or Remove to add or remove images from the list.

To add or remove images using the smart tag

  1. Select the ImageList component, or add one to the form.

  2. Click the smart tag glyph (Smart Tag Glyph)

  3. In the ImageList Tasks dialog box, select Choose Images.

  4. In the Images Collection Editor click Add or Remove to add or remove images from the list.

See Also

Images, Bitmaps, and Metafiles
Walkthrough: Performing Common Tasks Using Smart Tags on Windows Forms Controls
ImageList Component