Jonathan, I imagine you want to get the file address. Well, for this you need to do a check if what is being dragged is in fact a file with the DragOver Event
private void TextBox_DragOver(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect = DragDropEffects.Link;
else
e.Effect = DragDropEffects.None;
}
Then when you drop the file inside the TextBox (DragDrop Event) you create a string with the
private void TextBox_DragDrop(object sender, DragEventArgs e)
{
string arquivo = e.Data.GetData(DataFormats.FileDrop) as string;
TextBox.Text = arquivo;
}
In short, that's good luck.
Source:
-com-c / "> link