ImageList


The ImageList component stores a series of images for use by other controls or by the program’s code. For example, one way to display an image on a Button control is to create an ImageList component holding the image. Set the Button’s ImageList property to the ImageList component and set its ImageIndex property to the index of the image in the ImageList.

To add images to the component at design time, open the form designer, select the component, click on the Images property in the Properties window, and click the ellipsis (...) on the right. The Image Collection Editor that appears has buttons that let you add, remove, and rearrange the images.

The ImageList component’s ImageSize property determines the size of the images. The component stretches any images of different sizes to fit the ImageSize. This means that a single ImageList component cannot provide images of different sizes. If you must store images of different sizes in the application, use another method such as multiple ImageList components, PictureBox components (possible with the Visible property set to False), or resources.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net