Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MouseEnter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01536382
Message ID:
01536385
Vues:
75
I think the issue is with Wait Window Nowait not with MouseEnter or MouseLeave, as as soon as you move the mouse the wait window closes, so you need to stop your mouse movement just when the wait windows appear, which must be why you see it working occasionally, ie try this:
loForm		= CREATEOBJECT('myForm')
loForm.Show(1)


DEFINE CLASS myForm as Form
	ADD OBJECT myTextbox as myTextbox
	ADD OBJECT myWWTextbox as myWWTextbox WITH TOP = 22
ENDDEFINE

DEFINE CLASS myTextbox as TextBox
	PROCEDURE MouseEnter(nButton, nShift, nXCoord, nYCoord)
		ACTIVATE SCREEN
		? 'Mouse entered at ', DATETIME()
	ENDPROC
	
	PROCEDURE MouseLeave(nButton, nShift, nXCoord, nYCoord)
		ACTIVATE SCREEN
		? 'Mouse left at ', DATETIME()
	ENDPROC
ENDDEFINE

DEFINE CLASS myWWTextbox as TextBox
	PROCEDURE MouseEnter(nButton, nShift, nXCoord, nYCoord)
		WAIT WINDOW 'Mouse entered at ' + TRANSFORM(DATETIME()) NOWAIT
	ENDPROC
	
	PROCEDURE MouseLeave(nButton, nShift, nXCoord, nYCoord)
		WAIT WINDOW 'Mouse left at ' + TRANSFORM(DATETIME()) NOWAIT
	ENDPROC
ENDDEFINE
>Hi All
>Is there a trick to get MouseEnter and MouseLeave to work on a Textbox?
>If I use the Wait Window Nowait function in MouseEnter nothing happens most of the time when the mouse enters. Very occasionally it does, but very intermittant.
>Thanks and regards
>John
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform