Click here to Skip to main content
15,917,321 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My doubt is simple i want to make a button visible when mouse cursor is on the control and should be invisible when mouse cursor is moved away from it..???? :doh: :confused:
I have handiled an event of an group box called MouseHover event. The group box is becoming visble when mouse cursor is on it. But, When cursor is moved away from it, then even it is visble. Example code is here:-
private void groupBox2_MouseHover(object sender, EventArgs e)
{
              button10.Visible = true;
}

Please help me out. Thank you in advance.................... :)
Posted
Updated 20-Dec-09 3:43am
v3

1 solution

Where do you ever set the visibility to false? The MouseEnter and MouseLeave events are probably what you're looking for; Hover only fires when the mouse rests on the control which only tells you the mouse is currently on the control, not when it leaves it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900