am looking for a way to count down from 30 seconds using a timer and updating a Gauge using Progress to reflect the time remaining.
I know this is very simple code but my brain is some what dead here my bad code.
procedure FreeTimerTimer(Sender: TObject);
begin
TotalTime := GetTickCount() - FreeTimer.Interval; // 30000 int
//
Gauge.MaxValue := 100;
Gauge.MinValue := 0;
Gauge.Progress := TotalTime;
//
if Gauge.Progress = 100 then
begin
FreeTimer.Enabled := False; // stop timer when done
end;
end;
Thanks.