I have a code that when mouse hovers a button then it fires click event.But i want that when mouse hovers for 3 seconds then event must be fired.I have used intervals but could not find out solution. I have a simple windows froms c# application.
raaz999
0
Newbie Poster
Recommended Answers
Jump to PostI have a code that when mouse hovers a button then it fires click event.
I would strongly recommend against this approach because it's unconventional and surprising. If an application I used did this, I would stop using it post-haste and look for an alternative.
Jump to PostThere should be a hand gesture for click. It would be incredibly annoying if you only hovered it, especially accidentally, and then got stuck in a menu cycle of open and close because the detection wasn't working properly...
Jump to PostYour solution will end up invoking the method an increasing number of times, each time you hover the button.
You only need to add the event handler once.
Additionally, this is a bad way for you to handle timed events. The timer will allow you to specify a length of …
All 9 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
raaz999
0
Newbie Poster
Ketsuekiame
860
Master Poster
Featured Poster
raaz999
0
Newbie Poster
castajiz_2
35
Posting Whiz
castajiz_2
35
Posting Whiz
Ketsuekiame
860
Master Poster
Featured Poster
castajiz_2
35
Posting Whiz
Ketsuekiame
860
Master Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.