private void FrmMain_DragEnter(object sender, DragEventArgs e) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); if (files.Length > 0) { openFile openFileDelegate = new openFile(open); BeginInvoke(openFileDelegate, files[0]); Activate(); } }
private void FrmMain_DragDrop(object sender, DragEventArgs e) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); if (files.Length == 1) { openFile openFileDelegate = new openFile(open); BeginInvoke(openFileDelegate, files[0]); Activate(); } else if (files.Length > 1) { openFiles openFilesDelegate = new openFiles(openMultipleFiles); BeginInvoke(openFilesDelegate, (object)files); Activate(); } }