In my application the user can drag and drop files from windows explorer onto a listbox in my application. This all works excellent however when dragging multiple files, depending which file the user clicks in windows explorer to begin dragging, the order the files passed will differ when calling:
e.Data.GetData(DataFormats.FileDrop)
How do I receive the files in the same order as they are displayed in windows explorer?
Thanks for your help!
The order you receive them is the order in which they were selected. I encountered this problem once before and as far as I was able to tell you cannot get them in Explorer’s sort order.
Therefore your code should assume the user selected them in that order for a reason.