请教文件排序问题
一个目录内含文件如下(按文件名排序):
现希望能在filelistbox里或者listbox里显示如下(按修改时间排序):
请教如何编写?
[此贴子已经被作者于2017-4-28 22:32编辑过]
[此贴子已经被作者于2017-4-28 22:32编辑过]
2017-04-28 22:29
2017-04-28 22:36
2017-04-28 23:16
2017-04-28 23:18
2017-04-29 06:54
程序代码:Private Sub Command1_Click()
'List1的MultiSelect属性选择2-********则为多选
'list1的Sorted属性选择TRUE的话就是排序
For i = 0 To File1.ListCount - 1
List1.AddItem FileDateTime(Dir1.Path & "\" & File1.List(i)) & " " & File1.List(i)
Next i
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
File1.Refresh
List1.Clear
Call Command1_Click
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
2017-04-29 12:38
2017-04-29 22:11