>hello,
>i try to run this code(as a program) from vfp command window
>it not works.
>.enabled=.t.
>.interval=10*60*1000
>timer()event:do form menu1(or any form,program)
Of course it won't work; I didn't write code that should be executed, but properties (and methods) which you should assign to a Timer object.
Here is an example which you can copy to a PRG (or to the command window), to see how a Timer works.
x = CreateObject("MyTimer")
MessageBox("Click OK to exit.")
define class MyTimer as Timer
Interval = 10 * 1000
Procedure Timer
?? chr(7)
wait window "Hello, Mohammed" + chr(13) + chr(10) + "This is a Timer example" timeout 2
wait clear
Endproc
enddefine
Note: the .Enabled property is .T., by default.
However, it is easier to create a Timer (or other objects) through the Project Manager.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)