Hi all,
i am trying to rewrite an alarm clock now I have most of it completed but i am have issues with the code to check in the first item in the list is earlier or equal to the current time. The list is sorted in time orded. with the earliest time at the top of the list. Here is the code.
procedure TfrmMain.tmrAlarmTimer(Sender: TObject);
begin
// check top time against current time and if it is less then
begin
if StrToTime(lstTimes.Items[0]) = Now() then
begin
MessageDlg('Times up',mtConfirmation,[mbok],0);
end;
end;
end;
Now at present all I am do is displaying a message. Eventually it will paly a alarm.