How I can show one bar in order to show a passed time? and to play each second a sound ?
Example : 2 minutes
Falconi Silvio
How I can show one bar in order to show a passed time? and to play each second a sound ?
Example : 2 minutes
Silvio,
Use a timer
I must show Meter line because I must make a test for my boys at school
Regards
Silvio,
I meant: use a timer to update the meter value.
can YOu write a small sample to see How I can make it ?
Regards
#include "FiveWin.ch"
function Main()
local oDlg, oProg
DEFINE DIALOG oDlg TITLE "Progress and timer"
@ 1, 3 PROGRESS oProg POSITION 0 SIZE 120, 10
@ 2.5, 10 BUTTON "End" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTER ;
ON INIT Timer( oDlg, oProg )
return nil
function Timer( oDlg, oProg )
local oTmr
DEFINE TIMER oTmr INTERVAL 1000 ;
ACTION ( oProg:nPosition += 5, MsgBeep(),;
If( oProg:nPosition == 100, oTmr:End(),) ) OF oDlg
ACTIVATE TIMER oTmr
return nilthanks
Dear Antonio,
first problem
How I can to set the timer ?
on your example U use interval 1000
it is egual to one minute ?
second problem
How I can to show on progress bar the time remaining ( with number) ?
third problem
I made a game at school
when a boy does not answer well to a question in the test the procedure must remove the remaining time.
It is possible ?
How I can make to call a func to remove time to progress bar ?
Best Regards
Silvio,
milliseconds
Use a TMeter instead of a progress bar.
Simply set the meter to 100%.