Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect Mouse Leaving The Main Screen
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01232036
Message ID:
01232069
Vues:
18
I just needed something like this, and for I did not find any better solution (Although I am sure I could bind to some windows event, it was an overkiller to my small app), I used a timer, in my case is good enough, not sure in yours thou.


This is the code in the Timer event (my form is modal)
this.Enabled			= .f.

local laObjects(1), lnObjects

lnObjects				= Amouseobj(laObjects, 1)
if lnObjects = 0 or laObjects[1, 2] # this.Parent && The timer is on the form
	* I set here my Return value
	this.Parent.Hide()
endif

this.Enabled			= this.Parent.Visible 
Ah, and the interval I set it to 333 just by testing differnt values
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform