ICO files in image list used with listview

Saga 426 Reputation points

Hi all. I am using VS2019 C# with Windows 10 x64.

I am looking into the listView control. I've got it work, no prob. I "linked" an image list to it to display icons in the list view. I loaded the image list with ICO files that contain 24x24 and 48x48 icons, planning to make use of the Small and Large icon options.

How do I access the 24x24 or 48x48 icons depending on the listview view type?

I found the following:


But I hope that fater 12 years, there is a better practice to accomplish this. Thanks! Saga

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,483 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 82,326 Reputation points

    You can see this article for example : C# ListView

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Karen Payne MVP 35,286 Reputation points

    Your option is to settle with SmallImageList and LargeImageList so you need to separate them by size.

    1 person found this answer helpful.