1 AllowDrop
2
3 DragEnter:
4
5 if (e.Data.GetDataPresent(DataFormats.FileDrop))
6 e.Effect = DragDropEffects.Copy;
7 else e.Effect = DragDropEffects.None;
8
9
10
11 DragDrop
12
13 Array anyFiles = ((System.Array)e.Data.GetData(DataFormats.FileDrop));
14 for(int i = 0; i < anyFiles.Length; i++)
15 {
16 label1.Text+= anyFiles.GetValue(0).ToString()+"\n";
17 }