How to implement Mouse leave for a form.  
Author Message
Aleniko29139





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

I have a very small form that opens up to display some info. I'd like the form to close when the mouse leaves the form. I noticed there is no mouseleave or mouseenter for forms. Any other method to do this

Thx


Visual FoxPro1  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

It has mousemove event.
 
 
Aleniko





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

Yes, but no mouseleave event...

 
 
dni





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

There is MouseMove Event method with:

LPARAMETERS nDirection, nShift, nXCoord, nYCoord

You may close the form when mouse pointer leaves the form surface(setting mouse coordinates) using nXCoord and NyCoord



 
 
Tamar E. Granor





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

Another approach might be to use a timer that checks AMouseObj() and acts accordingly.

Tamar

 
 
Aleniko





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

MouseMove can't be a help. I have to set a minimum/Maximum nXcoord/nYcoord, and if the user moves the mouse too fast, It won't fire.



 
 
dni





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

In vfp 7 you have:

MouseLeave Event - mouse moves out of an object. You may drop a rectangular shape at margin of the form. When mouse leaves the object (aprox.same area with the form) form will close.



 
 
Aleniko





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

I thought about puting a container the size of the form in the form and use its MouseLeave method but I thought there may be a better way to do this.

 
 
CetinBasoz





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

MouseMove can help. Use your imagination. You might also check OnMouseOut at universalthread.com which implements it with a timer (remember people were not helpless when there weren't MouseEnter/Leave events but only MouseMove).
 
 
Docpro777





PostPosted: Visual FoxPro General, How to implement Mouse leave for a form. Top

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=905860&SiteID=1&mode=1

Perhaps note my own elementary use of "define window ... name" (command) here (today).

... with addobject() of an image object to the resultant form-container.

... as a workaround bridge to implementing swift form release during mousemove or mouseleave events ... upon a strategic *wait-window-nowait-like* form object.