Page 1 of 1

Dialog timeout

Posted: Wed Mar 09, 2011 2:33 am
by Wolfgang Ciriack
Hi all,
i have a dialog with a timeout.

Code: Select all

DCREAD GUI .... TIMEOUT nTimeout
1. Is it possible to show the remaining seconds in the dialog ?
2. Is it possible to stop the timer from within the dialog ?

Re: Dialog timeout

Posted: Wed Mar 09, 2011 3:02 am
by Tom
Hi, Wolfgang.

As you can see in DC_GetList:EventLoop() (_DCGETBX.PRG), the start time of the dialog is stored into a local var "nSeconds". Some changes to the DC_GetList class would allow to access this information. The timeout itself is stored into the class var "timeOut", which can be manipulated. But. Since this information is also read once by the event loop at start, a change would have no effect in my opinion.

Workaround: Create your own handler function and your own timeout system. Any event resets the timeout counter, that's almost it. If the timeout fires, just close the dialog from there.

Re: Dialog timeout

Posted: Wed Mar 09, 2011 5:35 am
by Zdeno Bielik
[quote=
1. Is it possible to show the remaining seconds in the dialog ?
2. Is it possible to stop the timer from within the dialog ?
[/quote]

Hi,
any easy and ready-to-use solution I will appreciate too ;)

Zdeno

Re: Dialog timeout

Posted: Wed Mar 09, 2011 11:37 pm
by Wolfgang Ciriack
Thanks Tom.