Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer Class
Message
From
23/01/2003 16:30:37
 
 
To
23/01/2003 16:03:09
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00744857
Message ID:
00744873
Views:
9
Russell,

Here is an over-simplified example...for purposes of this example you can create a form called testit, and put CLEAR EVENTS in unload() method of form (I don't think this is the best place to put CLEAR EVENTS...)

In a realworld app, oTimer could be an object inside of an application object, or could be an object that is added to _SCREEN.

After creating form, put this in a program and run it.
oTimer = createObject("actionTimer")
do form testIt
read events

define class actionTimer as timer

    interval = 10000  && 10 seconds
    nCount = 0

	procedure timer
		this.nCount = this.nCount + 1
		activate screen
		? "hello world!!",this.nCount
	endproc

enddefine
>I want to be able to periodically upload files via ftp from a application that runs continuously. Everything I have read points to using the timer control in VFP. How do I activate this class from within a program file? Is this possible?
>
>Thanks in advance for your help,
>Russell
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform