Image Array
I want the user to be able to click on a folder and have the images gif and jpg in that folder placed in an array so that I can then use them as backgrounds for buttons
ie
Button1.backgroundimage = imagearray(0)
Button2.backgroundimage = imagearray(1)
Button3.backgroundimage = imagearray(2)
etc
How would I best code this?
Scott LyslePosted Apr 12, 2007, 2:10 AM
Add an image:
ImageList1.Images.Add(99, Image.FromFile("C:\Temp\SomeImage.jpg"))
Remove an image:
ImageList1.Images.RemoveAt(99);
Set a button to use an image (with the image list already assigned to the button):
Button1.ImageIndex = 4