Vista not recognizing MouseLeave, MouseUp

R

rory.groves

I have an C# .NET 2.0 application which runs fine on XP, but on Vista
(Home Basic), the MouseUp event does not fire until i move the mouse
over another control/button in the application. The same thing happens
for the MouseLeave events. They do not fire until the mouse enters a
different control.

This would seem to be a huge problem, but i did not see much online
about it.

Does anyone know what could be causing this?
 
F

Family Tree Mike

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.
 
R

rory.groves

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.
 
F

Family Tree Mike

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.


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top