C#C
C#3y ago
gbrl

❔ Drag and drop not working

It appears with a prohibited sign
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); } } }
WhatsApp_Image_2023-04-26_at_19.09.28.jpeg
Was this page helpful?