• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 834
  • Last Modified:

MouseHoverTime

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
ToddHawley4984
Asked:
ToddHawley4984
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
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
 
ToddHawley4984Author Commented:
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now