D
David Veeneman
I want to introduce a one-second delay into the MouseHover event of a label.
In other words, I want the user to have to hover over a label for one second
before the label's MouseHover event triggers a response from the
application.
Here's what I've got so far:
-- Add a timer control and a bolean DoAction flag to the form.
-- Set DoAction flag to false and the timer for a one second interval.
-- Start the timer when the label's mouseEnter event fires.
-- When the label's MouseHover event fires, exit the event handler as long
as the DoAction flag is false.
-- When the timer fires it's interval event, set the DoAction flag to true.
The next MouseHover event will trigger the response to that event.
This approach seems more complicated than it needs to be. Is there a simpler
way to accomplish the same thing?
Thanks in advance.
In other words, I want the user to have to hover over a label for one second
before the label's MouseHover event triggers a response from the
application.
Here's what I've got so far:
-- Add a timer control and a bolean DoAction flag to the form.
-- Set DoAction flag to false and the timer for a one second interval.
-- Start the timer when the label's mouseEnter event fires.
-- When the label's MouseHover event fires, exit the event handler as long
as the DoAction flag is false.
-- When the timer fires it's interval event, set the DoAction flag to true.
The next MouseHover event will trigger the response to that event.
This approach seems more complicated than it needs to be. Is there a simpler
way to accomplish the same thing?
Thanks in advance.