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!

2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by ddanbe
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;
        }
This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.