ImageList failure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Homer J Simpson

    #1

    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(Bitm ap.FromFile("C: \MySmallImage1. bmp"))
    imageListSmall. Images.Add(Bitm ap.FromFile("C: \MySmallImage2. bmp"))
    imageListLarge. Images.Add(Bitm ap.FromFile("C: \MyLargeImage1. bmp"))
    imageListLarge. Images.Add(Bitm ap.FromFile("C: \MyLargeImage2. bmp"))
    PictureBox1.Ima ge = imageListLarge. Images(1)
    PictureBox2.Ima ge = imageListSmall. Images(1)

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





Working...