Mouse Hook


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Mouse Hook

  1. #1
    Michael Culley Guest

    Mouse Hook


    I have an app which I'm using a Mouse Hook for. It is run-of-the-mill VB mouse
    hook code, but it GPFs at random when the right mouse button is pressed.
    I have searched for all the simple stupid mistakes that I could have made
    (eg accidentally using byref instead of byval etc) and have found none.

    The candidate I see most likely is the stopping of the mouse hook. When the
    user clicks the right mouse button the active form is unloaded and the hook
    stopped. So is it possible to stop a mouse hook in the MouseProc? When I
    stop it the callNextHookEx is not called as it has been killed. Could this
    be causing the GPF?

    Thanks in advance

    Michael Culley

  2. #2
    Eduardo A. Morcillo Guest

    Re: Mouse Hook

    Try calling callNextHookEx before removing the hook.

    --
    Eduardo A. Morcillo
    http://www.domaindlx.com/e_morcillo



  3. #3
    Eduardo A. Morcillo Guest

    Re: Mouse Hook

    Try calling callNextHookEx before removing the hook.

    --
    Eduardo A. Morcillo
    http://www.domaindlx.com/e_morcillo



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center