Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Countdown timer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01434805
Message ID:
01434822
Vues:
111
An instance of the Timer is added to the _SCREEN.
IF TYPE('_screen.Timer15')='O'
	_screen.RemoveObject('Timer15')
ENDIF
_screen.AddObject('Timer15', 'Timer15Class')
* end of main

DEFINE CLASS Timer15Class As Timer
	Timeout=0
	MaxTimeout=0
	Interval=0

PROCEDURE Init
	WITH THIS
		.Timeout=0
		.MaxTimeout=15000
		.Interval=1000
	ENDWITH

PROCEDURE DoSomething
	ACTIVATE SCREEN
	? DATETIME()

PROCEDURE Timer
	WITH THIS
		.Timeout = .Timeout + .Interval
		IF .Timeout > .MaxTimeout
			.Interval=0
			RETURN
		ENDIF
		.DoSomething
	ENDWITH

ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform