the code so far installs a hook to detect the mouse activity but what i want is either to filter the activity for certain UI or to detect where the clicks has occurred (on which hwnd ) exactly 'Desktop' is there a way ?
this is the code i've used it's from Microsoft website here : How to set a Windows hook in Visual C# .NET
EDIT : i found that he code provided by is not global so for global hook check link in the answer the answer ,,