Jun 3, 2018 04:16 AM
(This post was last modified: Jun 3, 2018 04:18 AM by markzuckerberg.)
Hello HF,
I need help here.. I have a list view with items(Files) added from a directory and sub directories as below code :
Now i need the Listview to show only last 15 files that added or modified files, i don't want to add them all in the listview. 🤨
can it be done ? 🤦♂
Thanks in advance! 🤝
I need help here.. I have a list view with items(Files) added from a directory and sub directories as below code :
Code
Dim directory = "c:\"
Dim files() As System.IO.FileInfo
Dim dirinfo As New System.IO.DirectoryInfo(directory)
files = dirinfo.GetFiles("*", IO.SearchOption.AllDirectories)
For Each file In files
With LVMAINFILEMANAGER
.Items.Add((file).ToString())
With .Items(.Items.Count - 1).SubItems
.Add((file.DirectoryName).ToString())
.Add((file.CreationTime).ToString())
End With
End With
LVMAINFILEMANAGER.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize)
LVMAINFILEMANAGER.Columns(1).Width = "0"
Next
On Error Resume NextNow i need the Listview to show only last 15 files that added or modified files, i don't want to add them all in the listview. 🤨
can it be done ? 🤦♂
Thanks in advance! 🤝

