Making a control visible from Form.OnMouseEnter
-
Hi all, I want to make some controls on my form visible only when the mouse is over the form. To that end, i set Visible=true in the onmouseenter event of the form, and visible=false in the onmouseleave. However, when you move the mouse over the controls that are newly made visible, the onmouseleave event fires and the control is made invisible again. Then, since the control disappears, the onmouseenter event fires again, start a cycle of flickering. Can anyone think of a way round this? I can see no way of telling where the mouse went (ie, did it leave the bounds of the form? or did it enter a control on the form) and thus no way of properly implementing this feature. Any ideas? thanks jon
using System.Beer;
-
Hi all, I want to make some controls on my form visible only when the mouse is over the form. To that end, i set Visible=true in the onmouseenter event of the form, and visible=false in the onmouseleave. However, when you move the mouse over the controls that are newly made visible, the onmouseleave event fires and the control is made invisible again. Then, since the control disappears, the onmouseenter event fires again, start a cycle of flickering. Can anyone think of a way round this? I can see no way of telling where the mouse went (ie, did it leave the bounds of the form? or did it enter a control on the form) and thus no way of properly implementing this feature. Any ideas? thanks jon
using System.Beer;
-
Hi all, I want to make some controls on my form visible only when the mouse is over the form. To that end, i set Visible=true in the onmouseenter event of the form, and visible=false in the onmouseleave. However, when you move the mouse over the controls that are newly made visible, the onmouseleave event fires and the control is made invisible again. Then, since the control disappears, the onmouseenter event fires again, start a cycle of flickering. Can anyone think of a way round this? I can see no way of telling where the mouse went (ie, did it leave the bounds of the form? or did it enter a control on the form) and thus no way of properly implementing this feature. Any ideas? thanks jon
using System.Beer;
You can avoid flickers but playing with flags...
M Aamir Maniar aamirOnline.com
-
I'm sorry i wasn't explicit. This is a Windows Forms application, hence the title stating Form.OnMouseEnter. Thanks Jon
using System.Beer;
-
You can avoid flickers but playing with flags...
M Aamir Maniar aamirOnline.com
The flicker is due to the fact that the control is constantly being hidden and unhidden. My form is optimized double buffered anyway.. But the flicker is not my problem here, it's the side effect.
using System.Beer;
-
The flicker is due to the fact that the control is constantly being hidden and unhidden. My form is optimized double buffered anyway.. But the flicker is not my problem here, it's the side effect.
using System.Beer;