Drag and Drop a Folder from Windows Explorer to listBox in C#
I succeeded in developing C# code for drag files from windows explorer to listBox. // Drag and Drop Files to Listbox private void listBox1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop, false)) e.Effect = DragDropEffects.All; else e.Effect = DragDropEffects.None; } private void listBox1_DragDrop(object sender, DragEventArgs e) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); foreach (string fileName in files) { listBox1.Items.Add(fileName); } } If I drag a folder to the listBox, all the files which are inside the folder to