>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)
endproc
enddefine
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges