Sunday, 15 September 2013

Mouse events in C#

Mouse events in C#

I use Mouse events MouseEnter and MouseLeave with a pictureBox. The Back
Color changes with Mouse Enter but do not change in normal with mouse
Leave Event.
public void pictureBox1_MouseEnter(object sender, EventArgs e)
{
pictureBox1.BackColor = Color.Blue;
}
public void pictureBox1_MouseLeave(object sender, EventArgs e)
{
pictureBox1.BackColor = SystemColors.Control;
}

No comments:

Post a Comment