Click here to Skip to main content
15,894,539 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I googled, but not found any helpfull info. Please help.
Need to do something while MLB is pressed.
Posted
Updated 6-Jan-13 23:44pm
v2
Comments
Richard MacCutchan 7-Jan-13 5:50am    
If the mouse is clicked outside of your form then the message will be sent to the window that has the focus; which is what the user wants.
[no name] 7-Jan-13 5:53am    
Think I need a global hook.

1 solution

Sorry to just give you a google search but there is a lot of info available and the approach may depend on what device(s) you are developing for.

Try googling with this text
listening to system events c# mouse click

But for a starting point have a look at this article and it's sample code.
Processing Global Mouse and Keyboard Hooks in C#[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900