globalmousekeyhook icon indicating copy to clipboard operation
globalmousekeyhook copied to clipboard

(Question) Handle Mouse Click Event

Open vozeldr opened this issue 4 years ago • 1 comments

I'm interested in MouseDownExt events. The use case is the user clicks a button in the application and it starts listening for this event. When the user clicks somewhere and the event is handled, I mark the event has Handled but the Click event still fires on the element that was under the cursor where I clicked. I want to handle the Click event but the MouseClick event handler doesn't have a Handled property. How can I accomplish this so the focus doesn't change and the click event doesn't fire on the element under the cursor?

vozeldr avatar Apr 13 '20 14:04 vozeldr

If I listen for both MouseDownExt and MouseUpExt and mark both as Handled, it seems to do what I want. If that's the correct/best solution, please close.

vozeldr avatar Apr 13 '20 17:04 vozeldr