Mouse Hover delay?
Hi, I have created a form with one button. I m using mouse hover event on button to execute code! But the problem is, I want to execute the code only if my mouse hover on button for more than 2 or 3 seconds!
Related Article: How to make a control sizeable with mouse
is a C# discussion thread by staticclass that has 2 replies, was last updated 1 year ago and has been tagged with the keywords: c#, drag, mouse, resize, size.
Andy90
Junior Poster in Training
77 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
You might try this:
private void button1_MouseHover(object sender, EventArgs e)
{
// check if this point stays within bounds of the button
// for longer then 2 secs.
Point CP = Cursor.Position;
}
ddanbe
Industrious Poster
4,375 posts since Oct 2008
Reputation Points: 2,126
Solved Threads: 738
Skill Endorsements: 26