Answer the question
In order to leave comments, you need to log in
C# how to hang a mousemove event on the screen?
I create a drag & drop of the entire window, you can drag for a certain area.
The problem is that you need to hang the mouse movement event on the screen, that is, so that the listener is called even when I move the cursor outside the program window. I can only hang on a window or its elements, but I didn’t find how to do this.
Answer the question
In order to leave comments, you need to log in
Dig towards Mouse Capture and don't listen to all sorts of hooks. This mechanism will allow you to catch mouse events even if the mouse is not in the focus of your window.
For example https://msdn.microsoft.com/en-us/library/ms171545(...
You need to use the global mouse hook via SetWindowsHookEx https://msdn.microsoft.com/en-us/library/ms644990(...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question