I have a drag-and-drop functionality in my application using DragDrop event and DoDragDrop method to start dragging. The question is: how can I capture cancelling dragging when Esc is pressed during the process of dragging?
I have a drag-and-drop functionality in my application using DragDrop event and DoDragDrop method
Share
That’s what the QueryContinueDrag event is designed to do. It is raised on the drag source when the user presses the Escape key, the e.EscapePressed property will be true. Set e.Action = DragAction.Cancel to cancel the D+D.