C #: Is there a shortcut to detect if the mouse is still hovering over the shortcut on the MouseHover event?

C #: Is there a shortcut to detect if the mouse is still hovering over the label on the MouseHover event?

Just curious if there is a bool to test, if not to get the math: (.

+1


source to share


1 answer


I think math is the only way to tell if the mouse is "still", but if you subscribe to hover and down events, then in most cases you should be able to handle whatever you want.



    private void label1_MouseHover(object sender, EventArgs e)
    {
        //make changes for hovering
    }

    private void label1_MouseLeave(object sender, EventArgs e)
    {
        //undo changes
    }

      

+2


source







All Articles