I am working on a large application and am adding some drag/drop functionality to it. Specifically, I am allowing the user to drag and drop a file into the main window to o
I'm not sure how things work in C#, so let me know if this answer is incorrect. In C++ MFC, the main window is disabled when a dialog is displayed. You can test to see if the main window is disabled and ignore the drop if so.
private void MyDragDrop(object sender, DragEventArgs e) {
if (CanFocus)
MessageBox.Show("dropped");
}
private void MyDragEnter(object sender, DragEventArgs e) {
if (CanFocus)
e.Effect = DragDropEffects.Copy;
else
e.Effect = DragDropEffects.None;
}