Images
that you added in Image list are added to the ImageList.ImageCollection, so it is collection type then you can use most of the collection methods.
Use the Images property to add, remove and access the image to display in background of panel.
Add(key,image)
Remove()
RemoveAt()
RemoveByKey()
Check the example on the ImageList Class documentation to understand that how pragmatically use all of these methods.
Add Image:
imageList1.Images.Add("pic1", Image.FromFile("c:\mypic.jpg"));
Remove Image from collection:
imageList1.Images.RemoveAt(listBox1.SelectedIndex);
imageList1.Images..RemoveByKey("pic1");
To access images, get image from the imagecollection
panel1.BackgroundImage = imageList1.Images[0];
or
panel1.BackgroundImage = imageList1.Images["pic1"];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…