Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically Load items(Images) in list view on user scroll in c#

I'm using a list view control that is attached to an image list to display thumbnails of images in the list view on a form.I'm adding images from a folder to the image list by using a loop and the following code ImageList1.Images.Add(Image.FromFile("c:\\windows\\img.bmp"));

But if there are lots of images a out of memory exception is thrown(even after disposing).I want to load the images to list view which are currently visible to the user,ie:loading the images dynamically on user scroll.If 5 images are in user view i want to load only 5 images,if the user scrolls i want to get the index of the images which should be currently visible to user and load those images only.

Please help me out on this one.

like image 334
techno Avatar asked Nov 05 '22 08:11

techno


1 Answers

Personally, I had very good experiences with ImageListView, both in terms of technology (performance) and author's reply (quality and speed).

I use it as a replacement for ListView whenever I need visual image lists.

like image 120
Uwe Keim Avatar answered Nov 13 '22 18:11

Uwe Keim