?
Solved

MouseHoverTime

Posted on 2010-09-08
2
Medium Priority
?
812 Views
Last Modified: 2013-11-27
Hi,

I am using the 'mousehover' event of a picturebox in vb 2010 express.  Is there a way i can lengthen the mouseover time?  I DO NOT want to change the time for the whole OS, just my program. Any ideas?
0
Comment
Question by:ToddHawley4984
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 33631025
You can use the MouseEnter() event to start a Timer with your desired "hover" interval.  In the MouseMove() event simply turn off the Timer and immediately re-start it again.  In the MouseLeave() event turn off the Timer.  If the Timer Tick() event ever fires then the mouse was over the PictureBox for your target time without being moved so you can trigger whatever code you need...
0
 

Author Closing Comment

by:ToddHawley4984
ID: 33631197
That worked however I did remove the move event.  If the user doesn't let go of the mouse the timer would just keep restarting and nothing would happen.  Thanks for your help
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question