Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timer Class
Message
De
23/01/2003 16:30:37
 
 
À
23/01/2003 16:03:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00744857
Message ID:
00744873
Vues:
14
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform