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 DragDrop12 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 }
新闻热点
疑难解答