Results 1 to 4 of 4
  1. #1
    Tandem is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Posts
    15

    Mouse Move Event - End if Mouse not Hovering

    I have a mouse-move event attached to an image. When you roll over the image, a label becomes visible. I want it to become invisible again once the mouse leaves the image.



    But there's a catch. Using the detail section mouse-move event to set the visibility back to false won't work. This is a navigation form and the navigation portion has no mouse-move ability. If a user has their mouse on the image at the top of the screen and then moves the mouse very quickly to the navigation area, the mouse-move event on the detail/header doesn't trigger.

    Is there an easy bit of code to add to the image mouse-move event which will check if the mouse has left the image?
    Thanks!

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    I would say no, nothing easy on that one. Its a PITA, a common drawback. but, you could try putting the image in a control that mimics this functionality.
    But ideas...
    You can call windows Get Cursors Position API and then compare that to if you were over the image or not

    possibly return the HWND of the object the mouse cursor is over, more windows API

    Store an Image in a tooltip, this would work nicely. but more API afaik.

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    I don't have access installed... but maybe a labels tooltip box might work?

    Place a label, stretch over entire picture and set to transparent. Then put in the tooltip text.

    Because I don't have access installed now, it might not be tooltip that I'm thinking of.. but it acted as hover text.


    Sorry I couldn't give you actual terms...

  4. #4
    Tandem is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Posts
    15
    Thanks for the ideas guys. Unfortunately all I could really do about this was add a little extra blank space around the controls. Attached is a an image of what this looks like. For anyone trying to achieve a similar effect, I highly suggest placing your buttons off in a corner somewhere with lots of blank space around them so the mouse has a chance to hit the detail section.
    Attached Thumbnails Attached Thumbnails rolloverexample.png  

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Event after hovering over a button
    By redekopp in forum Programming
    Replies: 7
    Last Post: 11-23-2015, 06:08 AM
  2. Replies: 4
    Last Post: 04-21-2015, 07:08 PM
  3. Creating a mouse hover event
    By Coffee in forum Forms
    Replies: 1
    Last Post: 07-17-2011, 11:25 PM
  4. mouse wheel event
    By blueraincoat in forum Access
    Replies: 0
    Last Post: 03-30-2011, 12:42 AM
  5. On Mouse Move, Flickering
    By 95DSM in forum Programming
    Replies: 1
    Last Post: 01-04-2011, 08:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums