Ciao bartig,
Et voilà:
private void panel1_PreviewDragEnter(object sender, DragEventArgs e)
{
if ((e.Data is DataObject) && ((DataObject)e.Data).ContainsFileDropList())
e.Effects = DragDropEffects.Copy;
else
e.Effects = DragDropEffects.None;
}
private void panel1_PreviewDragOver(object sender, DragEventArgs e)
{
e.Handled = true;
}
private void panel1_Drop(object sender, DragEventArgs e)
{
if (e.Data is DataObject)
{
DataObject data = (DataObject)e.Data;
if (data.ContainsFileDropList())
{
foreach (string filePath in data.GetFileDropList())
..fai quello che ti pare col file in 'filePath';
}
}
}
Ricorda di mettere a true la property AllowDrop del controllo che riceve il drop.