Hi, I have a list box that on form load displays file names inside a directory using this code
DirectoryInfo di2 = new DirectoryInfo(path);
foreach (FileInfo fi2 in di2.GetFiles())
{
listBox1.Items.Add(fi2.Name);
}
Which works fine, however i have another function on my form which adds files to the directory read by the listbox, is there a way to update the listbox? . i was thinking maybe a timer but i'm not sure.
Thanks.