Q:

Getting C# listview to show thumbnails only when needed

I wanted to make the listview show thumbnails only when the items are visible on the screen.
Is there a way to do this?

A:

See an excellent implementation of what your after on CodeProject

A:

You can do this by using a ListView in virtual mode, and then adding your generated thumbnails to the LargeImageList during the RetrieveVirtualItem event (if they are not already there).
If you wanted most of the work done for you, you could use a FastObjectListView from the ObjectListView project (an open source wrapper around .NET WinForms ListView) and then follow this recipe on how to use images loaded from a database. Your images, of course, would be thumbnails created from the source rather than images from a database but the logic is the same.

