Home » Developer & Programmer » Forms » how time will run in reverse mode (FORM 6I/DEVELOPE 2000)
how time will run in reverse mode [message #314281] Wed, 16 April 2008 05:07 Go to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member

hi all

my question is this how the time will run in reverse mode like

10-9-8-7-6-5-4-3-2-1-0 my probem is this i have saved time in database example in database i have given 10 minutes clock that will be running on my canvas which will be in revers mode if running time will match from my saved time than form should be i have already run the executing clock with the help of timer
but its running in normal mode not in reverse mode

thansk

owais
Re: how time will run in reverse mode [message #314448 is a reply to message #314281] Wed, 16 April 2008 13:53 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
You can't make a timer run backwards, since the interval parameter won't acept negative values.

Why don't you just set your timer to 1000 miliseconds so that it expires every second, and in your when-timer-expired enter whatever code is necesary to make it look like your doing the count down. i.e

:global.v_secondsleft := :global.v_secondsleft - 1;
:blk_item := :global.v_seconds_left


You can do the very same thing to control the minutes. And finally a timer that expires after 10 minutes just to stop the whole thing.

That's way i would do it, unless there would be a clock component that could do what your trying to do, but I honestly don't know if there's any
Re: how time will run in reverse mode [message #314456 is a reply to message #314281] Wed, 16 April 2008 15:19 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
hi solis

i tried in this way but time is not running backward pls go through some sample codes

not working--:global.v_secondsleft := :global.v_secondsleft - 1;

thanks
owais
Re: how time will run in reverse mode [message #314470 is a reply to message #314456] Wed, 16 April 2008 17:01 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
owais_baba wrote on Wed, 16 April 2008 15:19

not working--:global.v_secondsleft := :global.v_secondsleft - 1;



Listen, you would have to declare :GLOBAL.v_secondsleft in your When-New-Form-Instance trigger like this:
:GLOBAL.v_secondsleft := 59;

And on the When-Timer-Expired you do the:
:global.v_secondsleft := :global.v_secondsleft - 1;

And display it on an item. you also have to check that after you reach 00, you reset it to 59.
Try it. It should work Smile

Hope I'm being helpful owais
Regards!
Re: how time will run in reverse mode [message #314707 is a reply to message #314456] Thu, 17 April 2008 09:39 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
thanks dear now its working before also i had defined global.variable in when-new-form but i was doing some mistakes in timer_expired anyway i have done


thansk again
owais
Re: how time will run in reverse mode [message #314708 is a reply to message #314707] Thu, 17 April 2008 09:43 Go to previous message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Ok owais, that's perfect, I'm glad to know that, you're wellcome.

Keep it up Smile
Regards!
Previous Topic: How to execute the values automatically in a form at run time?
Next Topic: ORDER BY - block property
Goto Forum:
  


Current Time: Thu Feb 06 10:02:44 CST 2025