Click to See Complete Forum and Search --> : Sort of files


eng70640
March 21st, 2001, 06:19 AM
Suppose my default directory is 'C:' , i have 4 files 1files.jpg , 2files,jpg , 3files.jpg & 4files.jpg. Can i sort this 4 files in the order of 1files.jpg , 2files,jpg ..to 4files.jpg just in case they are no in this order in this directory ? I need to sort this out so that i can load it into a picturebox in this order.

shree
March 21st, 2001, 06:29 AM
Add the filenames to a ListBox Control with the Sorted property set to true. Then, when loading the pictures, take the filename form this listbox. Set the visible property of the listbox to false.

Using the listbox is a quick method of sorting things, if speed is not a problem for your application.