[RESOLVED] drag and drop order question
Code:
Dim f() As String
' Assign the files to an array.
f = e.Data.GetData(DataFormats.FileDrop)
I use the above code in my DragDrop event to get a list of files which were drag and dropped onto my form. My only problem is the order of the files. If I selected a bunch of files in explorer and drag them onto my form they are put into the f() array in a different order then they were selected and dragged.
Any suggestions?
Re: drag and drop order question
if I select these files:
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
and set a breakpoint after the last line of code and watch f() it's arranged like this after the drag and drop operation.
(0) 3.jpg
(1) 4.jpg
(2) 5.jpg
(3) 6.jpg
(4) 1.jpg
(5) 2.jpg
Now is that explorer passing them in that order or is GetData sorting them somehow?
Re: drag and drop order question
If you selected them in the order posted then it may be that in explorer its order is different since you can have 5 different view and 4 different sorting methods. in other words, what you see is not necissarily the actual index order.
Re: drag and drop order question
yeah that must be it.. I just re-sorted in my app.. solved the issue :D