private void textBox1_DragDrop(object sender, DragEventArgs e) { textBox1.Text = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString(); } private void textBox1_DragEnter(object sender, DragEventArgs e) { if (e.Data .GetDataPresent(DataFormats .FileDrop )) { e.Effect = DragDropEffects.Link; } else { e.Effect = DragDropEffects.None; } }