Implementing a Count Down System


John Clarke
For various reasons I want my app to have a time limit on it.  However, this time limit will be dependent upon the options they select on the main form.  Once they have selected their options and pressed the start button a countdown will begin and the first form will be shown.  This form and every other form will show a countdown clock.  How can I achieve this ?When the countdown finishes the user will be taken to a summary page ?  How can I achieve this ?

DecSoft

Hello John,

Probably you must look for the Timer control. You can set an "[CountDown]" variable in the app's Ready event. You can set this variable to certain number of seconds, for example, 60.

You can place an Timer control in the first app's view and start the timer when you need. In the Timer's Interval event you can do whatever you wanted with the "[CountDown]" variable.

For example, you can decrement (using the "Dec" action) the refered variable, and, additionally check if the variable reached the zero value: this means the count down "ends", to say like that.

Can the above help you in some way?



John Clarke
If I want to display the timer on other views then I am guessing that the Timer control will need to set the values on each view it needs to display a timer on.

DecSoft

Hello John,

No problem. You can use the "[CountDown]" variable, for example, to be placed in an HTML control (to be shown to the user) in all the app's views. The Timer's Interval is executed in the background even if you are in other view, until you stop it with the "TimerStop" action.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.