Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer control... How to use it?
Message
From
19/08/2001 15:49:46
 
 
To
18/08/2001 14:33:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00545885
Message ID:
00545992
Views:
9
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform