Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automated Tasks
Message
From
24/05/2004 09:38:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
24/05/2004 01:46:36
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00906260
Message ID:
00906493
Views:
32
>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 && every 10 seconds
  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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform