❔ Drag and drop not working
It appears with a prohibited sign
Here's my code:
Here's my code:
namespace WinFormsAppPrueba
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void listBox1_DragDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect = DragDropEffects.All;
else
e.Effect = DragDropEffects.None;
}
private void listBox1_DragEnter(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
}
}
}