Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timer control... How to use it?
Message
De
19/08/2001 15:49:46
 
 
À
18/08/2001 14:33:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00545885
Message ID:
00545992
Vues:
16
>Hi. How do you set up the timer control? Sorry to ask but help is not very helpful. I need a label to flash like every second. I know I have to set the Visible property to .f. and .t., but how do you program this in the timer?

Try running the program:
_screen.AddObject('lblFlash', 'label')
_screen.lblFlash.AutoSize = .T.
_screen.lblFlash.Caption = "You've been flashed!"
PUBLIC oTimer
oTimer = CREATEOBJECT('theflasher')
DEFINE CLASS theflasher AS timer
	Interval = 200
	PROCEDURE timer
		_screen.lblFlash.Visible = not _screen.lblFlash.Visible 
	ENDPROC 
ENDDEFINE
Visually, You can drop the timer object on a form and put the code in the Timer Event there too.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform