D
D
Dealaxer2019-04-12 16:42:16
.NET
Dealaxer, 2019-04-12 16:42:16

Fastest way to load images into an ImageList from a folder?

Is there the fastest way to load images into an ImageList from a folder for a ListView? Without consuming a huge amount of memory.
This method is very slow and eats too much:

Dim images As New ImageList
 
    For Each filePath In IO.Directory.GetFiles(folderPath)
        images.Images.Add(Image.FromFile(filePath))
    Next

But if you load images directly into the ImageList of the application, everything opens instantly, but when compiled, the weight of the application turns out to be too large.
Are there instant download methods?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dealaxer, 2019-10-27
@Dealaxer

The backgroundworker method works perfectly!
Thanks to everyone who doesn't know for the help!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question