Solved

MouseHoverTime

Posted on 2010-09-08
2
778 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
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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 video discusses moving either the default database or any database to a new volume.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now