Determine Double-Click / Middle Click using low-level mouse hook?
-
hai, I have question since there were many article implementing low-level hooking in C#. i couldn't manage to find how to determine when we click the middle button or double-clicked the mouse using low-level mouse hook. is there any way / method to do that? i'm using unmanaged c++ dll wrapper (WilsonGlobalHook) from this site. thx
-
hai, I have question since there were many article implementing low-level hooking in C#. i couldn't manage to find how to determine when we click the middle button or double-clicked the mouse using low-level mouse hook. is there any way / method to do that? i'm using unmanaged c++ dll wrapper (WilsonGlobalHook) from this site. thx
-
Check out this article: http://www.codeproject.com/csharp/globalhook.asp[^] It has a MouseActivity Event that you can see which mouse button was clicked.
-
thankz for the answer, but I have look throughout that article before, and those article/project only cover the "left" and "right" clicks button. any way to determine "middle" clicks? low-level hooking problem maybe?
Got it, I'm sorry before... the class I used only handle WM_LBUTTONDOWN / WMLBUTTONUP and WM_RBUTTONDOWN / WMRBUTTONUP.. so just modify the class a little bit and add WM_MBUTTONDOWN / MBUTTONUP and maybe the double click handler to modify it. yeah.. thankz a lot..