I need a way to set the MouseHoverTime Property, or some other way of making it so that the mouse needs to be over a control for a given amount of time before an event kicks in.
I have a set of controls that need to execute code when the mouse passes onto them, which can be done with either MouseEnter or MouseHover. However, when the mouse passes quickly over many of these controls, the code event for each control gets run in full. This makes the running of the program painfully and impractically slow. If I could set a certain time threshold for the mouse to stay over the control, then the event would only be called when the mouse stays over the control, and not when it briefly passes over it.
Private Sub Tile_MouseHover(Sender As Object, e As EventArgs)
CODE
CODE
CODE
End Sub
The code does give the intended results. It just gives them at a snails pace, because every time the cursor so much as brushes a control, all of the code within it gets executed.
The goal results would be as follows:
When the cursor hovers over a control, it must remain there for 1-2 seconds before calling the event. If the cursor leaves before this, the event doesn't get called at all.
issue comes into play when the user tries to hover over a distant tile.
Something tells me we need to see this code in order to solve the real issue you have. – SystematologyNativeMethods.TRACKMOUSEEVENT
to 100 milliseconds. – Wrung