Mouseless Drag and Drop - change the way the event is created (programmatically increase the drop / drag event)

(first the question that I will explain)

How do I tell a program to lower an object / raise a drag event (I don’t use a mouse)?

I am currently developing MSKinect, and I want to implement Drag and Drop, really close to natural drag and drop (see msdn doc ).

I already implemented drag and drop using the canvas and using the event raised by Kinect cursors to β€œdrag” things around. but I'm more interested in data transfer using drag and drop.

I know that usually the drop event is fired when the mouse button is released, I want to make release draggableElement when this gesture occurs.

Additional information: I implement the Manager based on the work of LesterLobo

+5
source share
1 answer

You can globally model mouse movements and clicks using the SendInputWin32 API function . You can find instructions on calling a function using C # here .

The function SendInputis as close as possible to the actual use of the mouse. Unfortunately, working with her is not very convenient. You will need to simulate left-clicking, moving the mouse, and releasing the left mouse button.

Please note that this approach is designed to drag and drop content across applications as well as into the application. If you just want to drag and drop stuff inside the app, this is most likely a simpler solution.

0

All Articles