Very simple :
Hook all Windows' Mouse events using API call
HHOOK SetWindowsHookEx(
int idHook, // type of hook to install
HOOKPROC hkprc, // address of hook procedure
HINSTANCE hMod, // handle of application instance
DWORD dwThreadID // identity of thread to install hook for
);
with <idHook> = WM_MOUSE and <hkprc> the address of YOUR hook-procedure. ALL
mouse-events for ALL threads will then go through your procedure of you set
<dwThreadID> to 0 (zero). There you can STOP the dispatch & distribution of
the events to receiving Windows objects.
In order to stop the "freezing" process, use the API function
BOOL UnhookWindowsHookEx(
HHOOK hhook // handle of hook procedure to remove
);
With kind regards,
Koen Matthijs
Quote:
>How can I make (via API) to disable mouse (disable everywhere, not only my
>app.) . I need to prevent user's mouse movement for a while, and then
>re-enable it
>I've been looking on February Edition of MSDN, but I didn't find anything
>I'm using VB 5.0 SP3 and Windows NT workstation 4.0 SP3.
>any help would be apreciated.
> Fran Arreciado