Getting mouse button status if own program is not active
Hi,
I am programming a program at school that must check if the user is pressing down the middle mouse button. Now, you would say, this is easy, BUT: My program is running invisible and must get the mouse button status at ALL times (also if my program is not active).
Do you have any idea if there is an API function or another way to get the mouse button status? Any help is appreciated!!
Thanks a lot in advance,
Felix Haas
Germany
Re: Getting mouse button status if own program is not active
you could use the SetWindowsHookEx API function with a hook id of WH_MOUSE to trap ALL mouse messages. You need VB 5 or 6, because you have to pass the address of the hook procedure to that API call.