470,591 Members | 2,083 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

ImageList failure


Trying to set the images for a ListView control:

' Initialize the ImageList objects with bitmaps.
Dim imageListSmall As New ImageList()
Dim imageListLarge As New ImageList()
' Initialize the ImageList objects with bitmaps.
imageListSmall.Images.Add(Bitmap.FromFile("C:\MySm allImage1.bmp"))
imageListSmall.Images.Add(Bitmap.FromFile("C:\MySm allImage2.bmp"))
imageListLarge.Images.Add(Bitmap.FromFile("C:\MyLa rgeImage1.bmp"))
imageListLarge.Images.Add(Bitmap.FromFile("C:\MyLa rgeImage2.bmp"))
PictureBox1.Image = imageListLarge.Images(1)
PictureBox2.Image = imageListSmall.Images(1)

Both PictureBoxes show the same small image. Any thoughts? All 4 images are
different. The code is from Microsoft.

Feb 26 '06 #1
0 786

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Chuck | last post: by
2 posts views Thread by A. Solomon | last post: by
2 posts views Thread by Bob C. | last post: by
7 posts views Thread by Andrew Christiansen | last post: by
4 posts views Thread by Just Me | last post: by
6 posts views Thread by henrycortezwu | last post: by
2 posts views Thread by =?Utf-8?B?S2VuTg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.