2 years ago
#61211
Eduards
VB.NET Lazy load controls into flowlayoutpanel
I have a flowlayoutpanel with thousands of pictureboxes and even more buttons. I am looking for a way to not load the controls while they are outside the screen so that I don't have to wait for all the controls to load. Much like windows explored folder view works if you have say, a thousand files in a folder, you don't need to wait for all of them to load and display thumbnails.
The code and the way I am generating controls at the moment is:
For Each myDirectory As IO.DirectoryInfo In New IO.DirectoryInfo(ProjectsFolder & SmartHub_Home.ComboBox_Subcategory.SelectedItem & "\").GetDirectories().Reverse
'Programmatically creating controls
Next
vb.net
lazy-loading
panel
0 Answers
Your Answer