Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If this needs to be controlled on a specific element, then you need the MouseDown event.
Almost all UI controls have this event. Just subscribe to it (to MouseUp too, for the reverse action).
Additionally, you can look here - https://msdn.microsoft.com/ru-ru/library/system.wi...
If you need globally (no matter what element, just understand if any mouse button is pressed) - there is such a library, https://github.com/gmamaladze/globalmousekeyhook . There is an example there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question