mouseleave doesn't always fire



Hello and thanks in advance for the help....

Does anyone know why MouseLeave doesn't always fire?

Here is what I did...

I created a form to which I added a container.

In the MouseEnter Method I coded:
this.BackColor = 8454016 && Green

In the MouseLeave Method I coded:
this.BackColor = 255 && Red

Then I ran the form.

If you move the mouse slowly, it does exactly what you would expect. It
turns green when you enter and red when you leave.

But if you move the mouse quickly you can get it to miss the MouseLeave
event.

Does anyone know if there is anything that can be done about this (short of
tell my users to move the mouse slowly)?

Thanks,
Jeff


.



Relevant Pages

  • Re: TForm and CM_MOUSELEAVE not working
    ... In article, Eshipman ... Any ideas why the mouseleave doesn't fire when the ... cure is to start a timer when the form gets a CM_MOUSEENTER. ...
    (borland.public.delphi.language.objectpascal)
  • Re: DroppedDown
    ... MouseLeave will never fire. ... mouse has left the bounds of the drop down within the MouseMove. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: TForm and CM_MOUSELEAVE not working
    ... Any ideas why the mouseleave doesn't fire when the ... > cure is to start a timer when the form gets a CM_MOUSEENTER. ... Thanks, Peter, didn't think of that one... ...
    (borland.public.delphi.language.objectpascal)