Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a screen every minute in FPW2.6
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00363252
Message ID:
00363376
Vues:
15
Thank you very much. Your post is greatly appreciated.

I am definatly going to try your last suggestion since the screen is the main screen in the app and the users are working in that screen almost all the time.


>Rip,
>
>It sortof depends upon what the screen is doing...the short answer is that there are no "timers" in 2.6. But, having said that, I have an module in an app that scans a network directory for "jobs" to be processed and then shuttles them off to do something (details are not important). The code is attached to a screen and the app sits running on a PC in our server room.
>
>A button on the screen says "Process Jobs" and when the user presses that, the VALID() code fires and basically it just goes into a loop something like this:
>
>DO WHILE .T.
>
> * code to scan the directory is here
>
> * wait 10 seconds before next scan or else it chews up system
> * resources too much so I do something like
> =INKEY(10)
>
> * check if user pressed ESC to get out of screen
> IF LASTKEY() = 27
> EXIT
> ENDIF
>
> * code to update some on-screen prompts to tell them what is happening
>
>ENDDO
>
>*** end of code ***
>
>So if you are looking for a "static" screen to have a "timer" in it, the above would do the trick. If you are trying to do something on a screen that the user is also working on, much harder (in that case, you might have to attach some code to something like the WHEN() or maybe the VALID() hook of a field for every field on the screen [you would have to figure out which would work the best for your situation] and this code would go out and check a var [eg. a private var that contains a time value that you can then compare to every time you run the code] to see how long since the last "timer" event fired and if so, do some screen updates).
>
>Albert
Rip Ryness
International Falls, MN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform