Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer snippet
Message
From
11/10/2012 15:43:06
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01554837
Message ID:
01554842
Views:
34
Thankyou, young fellow. :-)


>>Could someone please post a little snippet for using the timer in VFP
>>
>>I want the timer to run for a periood of time and
>>when the time is up, DO a code.prg
>>
>>Sounds simple, but I have not found any example code in VFP help.
>>
>>Thanks kids.
>
>
>Some simple code:
>
>
>loForm			= CreateObject('myForm')
>loForm.Show(1)
>
>define class myForm as Form
>	add object myTimer as Timer with Interval = 1000
>	
>	add object myLabel as Label with Caption = 'Firing timer', Visible = .f.
>	
>	procedure myTimer.Timer
>		this.Enabled = .f.
>		thisform.myLabel.Visible = .t.
>		thisform.DoSomething()
>		thisform.myLabel.Visible = .f.
>		this.Enabled = .t.
>	endproc
>	
>	procedure DoSomething()
>		Inkey(1) && Just delaying...
>	endproc
>enddefine
>
I ain't skeert of nuttin eh?
Yikes! What was that?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform