Re: Elapsed time for a timer control by Andrew
Andrew
Wed Jun 29 07:53:57 CDT 2005
Not inherrently. However, this is fairly simple to achieve.
Make the interval something smaller than you want.
Say you require a 10 second delay and would like a 1 second countdown
Subclass the timer, CountDownTimer and add a property for the total delay,
iTotalDelay. Also add a Count property, iCount.
Add a Method for the Final Timer Event, FinalTimer
Set the iCount to 0
Now, in the Timer Event put the following
with this
.iCount = .iCount + 1
if .iCount = int(.iTotalDelay / .Interval)
.iCount = 0
.FinalTimer()
else
wait window alltrim(str(int(.iTotalDelay / .Interval) - .iCount, 12,
0)) nowait
endif
endwith
Drop the CountDownTimer and set the properties
Interval = 1000
.iTotalDelay = 10000
And put code in the FinalTimer Method.
Andrew R.
"kd" <kd@discussions.microsoft.com> wrote in message
news:2BEB7E99-3627-43A0-8605-42CACDCA492A@microsoft.com...
: Hi,
:
: Is it possible to display the elapsed time for a timer control before the
: Timer event is triggered;something like a decrementing counter to display
the
: count down?
:
: Thanks,
: kd
: