I know how to change to a custom cusor or visual instead of a standard cursor during drag and drop operations. I know how to get the current mouse position during drag and drop methods (often there is a GetPosition method, or alternatively I can use
p/invoke or System.Windows.Forms.Cursor.MousePosition getter).
My question is, how can I (or is it not possible) to change the mouse position programmatically during the drag/drop operation, ideally just before the drop occurs so that items are dropped at the point of the programmatically set cursor position?
I tried to to use the System.Windows.Forms.Position setter and SetCursorPos both in the source's PreviewQueryContinueDrag handler and the target's PreviewDrop handler but neither affected the position of where the items were dropped. In the case of
PreviewQueryContinueDrag, the mouse visually moved to the programmatic location
after the items were dropped, even though the PreviewQueryContinueDrag handler was called before the item was dropped (and before PreviewDrop).
View Complete Post