I’de like you to take a look at this code:
I have a Button named Button1.
private void button1_MouseHover(object sender, EventArgs e)
{
button1.BackColor = Color.Black;
}
private void button1_MouseLeave(object sender, EventArgs e)
{
button1.BackColor = Color.Blue;
}
This code works but the problem is there is a very small delay. About 1/2 second delay on changing the colors. I’ve tried the same thing in WPF and there is absolutely no delay in that. Basically I want the Mouse event to fire as quickly as possible.
In what ways can i accomplish that task ?
Thank you
Try using the MouseEnter event rather than MouseHover – the latter is fired ‘after a delay’ because Windows can’t tell that the mouse is hovering unless it has been stationary for a short while.