For some reason MouseHover and MouseLeave functions behave really strange. All I need to do is, when the cursor is over the "button", I want to make the button visible and when the cursor leaves the button, I want to make it invisible. Whatever I try I couldn't make it work. It seems like Mouse events not working when the control object is invisible.
private void button1_MouseHover(object sender, EventArgs e)
{
button1.Visible = true;
}
private void button1_MouseLeave(object sender, EventArgs e)
{
button1.Visible = false;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…