Changing ImageSize property of ImageList displays blank images

Viewed 3658

In my VB.Net solution in Visual Studio, I have a ListView and an ImageList associated with that ListView. It is set as the LargeImageList and SmallImageList.

Here is what it looks like without programmatically changing the ImageSize property of the ImageList:

However, if I resize the ImageList via:

ImageList1.ImageSize = New Size(64, 64)

Or any other size, I get this:

I tried calling ListView1.Refresh() afterwards, still nothing.

I even tried:

ListView1.LargeImageList.ImageSize = New Point(64, 64)

How do I dynamically set the size of the icons when the project is running? I need to be able to resize them to several sizes (i.e. 32x32, 64x64, 96x96, etc.)

The images in the ImageList are all 128x128 so that they could be scaled down easier.

1 Answers
Related