.NET: How to load an image into an ImageList

imageimagelistnet

i have an image that contains a series of images, e.g.:

enter image description here

In the olden days, i would load the image into the ImageList common control using such API calls as:

What is the .NET method of achieving the same result with the .NET ImageList class?


Note: The image is only an example. My actual image is a traditional toolbar image list image, with 179 16×16 button images.

Best Answer

It sounds like you're trying to add several images included in a single image object. In this case you'd want to use

imageList1.Images.AddStrip(imageSeries)

From the msdn docs: "A strip is a single image that is treated as multiple images arranged side-by-side"