private void Form1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { string file= ""; if(e.Data.GetDataPresent(DataFormats.Text)) { file = (string)e.Data.GetData(DataFormats.Text); } else if (e.Data.GetDataPresent(DataFormats.FileDrop)) { string[] fileNames; fileNames = (string[])e.Data.GetData(DataFormats.FileDrop); file = fileNames[0]; }
MessageBox.Show("wrong file format");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)