1,105,594 Community Members

Mouse Hover delay?

Member Avatar
Andy90
Junior Poster in Training
88 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
1
 

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!

Member Avatar
ddanbe
Posting Expert
5,354 posts since Oct 2008
Reputation Points: 2,066 [?]
Q&As Helped to Solve: 908 [?]
Skill Endorsements: 46 [?]
Featured
 
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;
        }
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: