Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timer snippet
Message
De
11/10/2012 15:43:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01554837
Message ID:
01554842
Vues:
33
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform