06-06-18, 04:34 PM
(آخر تعديل لهذه المشاركة : 06-06-18, 04:55 PM {2} بواسطة atefkhalf2004.)
شكرا لك كثيرا
وكيف يتم عرضهم في لستة الاول
كه صح ولا هناك الافضل
For i = 0 To fileList.Count - 1
ListBox1.Items.Add(fileList(i))
Next
وهذا الكود للحذف
ListBox1.DataBindings.Clear()
ListBox1.Items.Clear()
Dim di As New DirectoryInfo("d:\datacopy")
Dim fileList As FileInfo() = di.GetFiles()
fileList = fileList.OrderBy(Function(x) x.CreationTime).ToArray()
For i = 0 To fileList.Count - 4
'fileList(0).Delete()
هنا الخطأ
Dim DeleteFile As String = "d:\datacopy\" & fileList(i)
برجاء التعديل
My.Computer.FileSystem.DeleteFile(DeleteFile)
Next
وكيف يتم عرضهم في لستة الاول
كه صح ولا هناك الافضل
For i = 0 To fileList.Count - 1
ListBox1.Items.Add(fileList(i))
Next
وهذا الكود للحذف
ListBox1.DataBindings.Clear()
ListBox1.Items.Clear()
Dim di As New DirectoryInfo("d:\datacopy")
Dim fileList As FileInfo() = di.GetFiles()
fileList = fileList.OrderBy(Function(x) x.CreationTime).ToArray()
For i = 0 To fileList.Count - 4
'fileList(0).Delete()
هنا الخطأ
Dim DeleteFile As String = "d:\datacopy\" & fileList(i)
برجاء التعديل
My.Computer.FileSystem.DeleteFile(DeleteFile)
Next

