private void treeView1_DragDrop(object sender, DragEventArgs e) { if (e.Effect == DragDropEffects.Copy) foreach (string file in ((string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop))) OpenFile(file); }