I made a form1 that contains the following for mouseenter and mouseleave:
void Form1_MouseEnter(object sender, EventArgs e)
{
OtherForm.Opacity = 0.5;
this.Opacity = 1.0;
}
void Form1_MouseLeave(object sender, EventArgs e)
{
this.Opacity = 0.5;
OtherForm.Opacity = 1.0;
}
OtherForm is just an instance of another form that is shown. As I move out
of or into form1, the opacity switches as expected. I don't need to move
into form two to get the event propogated.
Perhaps a key difference is that I am building and running on Vista. I used
VS 2008 targeting .Net 2.0.
<ro*********@gmail.comwrote in message
news:9f**********************************@d42g2000 prb.googlegroups.com...
On Nov 15, 8:01 am, "Family Tree Mike"
<FamilyTreeM...@ThisOldHouse.comwrote:
Can't help without seeing your code, but these work fine for me on Vista.
By the way, the MouseLeave should happen as you described. The MouseLeave
event happens (in the form) when the mouse goes from the form to a
control.
I have a feeling you are not describing the action or expectation
correctly.
The code shouldn't matter in this case, as all my controls are
affected by this problem. I'm taking about both native and 3rd party
controls are showing erratic behavior in Vista while there is no
problem whatsoever in XP.
For example, i have a MouseLeave() event in a foreground form that
causes the form to become semi transparent when the mouse leaves the
form bounds. This does not happen in Vista until I move the mouse into
a second foreground form at which point the first foreground form
proceses the MouseLeave() code.
Its as if the MouseEnter, MouseHover, and MouseDown events fire
normally, but MouseLeave and MouseUp do not fire until MouseEnter/
Hover is called on a different control.