snake310

Hi

I have tried a whole bunch of stuff to speed up loading time but i dont know that to do.

I have a listView that uses an imagelist , the problem is that i have more than 2000 images and it takes time to load them all with this line of code

for (int i = 0; i < myTemp.Count; i++)

{

imageList1.Images.Add(new Bitmap(myTempIdea));

}

Dose anybody know something that could help me reduce loading time

btw i have tried to use VirtualList View and it did speed up my loading time but it mixed up the pictures




Re: Visual C# Express Edition fast way to load imagelist??

Ken_L

You can preload your images into an array and use this

imageList1.Images.AddRange(MyArray);

or just load the image when needed, instead of filling the entire array of images - which goes back to your first question

images[int] = filelocation

If you are programming a game, load everything into an array!






Re: Visual C# Express Edition fast way to load imagelist??

snake310

Thanks Ken_L;

That helped . BTW it will not be a game just a simple listview in virtual mode with tons of images.

Thx Again!