如何让我的列表在我的应用程序运行时一直更新,而不是仅在我启动我的应用程序时更新?
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
On Error Resume Next
Dim username As String
username = SystemInformation.UserName
Dim filesInFolder As String
filesInFolder= "C:\Users\" + username + "\AppData\Roaming\pictures\pics"
Dim di As New IO.DirectoryInfo(filesInFolder)
Dim aryFi As IO.FileInfo() = di.GetFiles("*.jpg")
Dim fi As IO.FileInfo
For Each fi In aryFi
list.Items.Add(fi.Name)
Next
End Sub