Temporaly disable mouse 
Author Message
 Temporaly disable mouse

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



Mon, 28 Aug 2000 03:00:00 GMT  
 Temporaly disable mouse

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




Mon, 28 Aug 2000 03:00:00 GMT  
 Temporaly disable mouse

Check the ShowCursor API

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




Mon, 28 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Temporaly disable mouse (v2: now COM port)

2. Temporaly disable COM port

3. HOWTO: Disable user mouse input but still allow software to play mouse events

4. DAO Recordset Temporaly storing

5. How do I disable the right mouse button over the webbrowser control ?How do I disable the right mouse button over the webbrowser control ?

6. how disable mouse wheel

7. Disable move to prev/next record when turning mouse wheel

8. Disable Mouse-Wheel though VBA?

9. disable the right mouse button when a form is running

10. 2nd post - Disable wheel on mouse

11. Disabling the Right Mouse click in an application

12. Temporarily disable the wheel on a mouse

 

 
Powered by phpBB® Forum Software