mam taki kod:
procedure TForm1.comboChange(Sender: TObject);
var D:TDate;
data:TDate;
czas:TTime;
R:Real;
begin
LongTimeFormat:='HH:mm';
INI:=TINIFile.Create(GetP()+'plan_lekcjidane'+'dane_'+list.Items[list.itemindex]+'wyd.ini');
typ.Caption:=INI.ReadString(combo.Text,'typ','');
kiedy.Caption:=DateToStr(INI.ReadDate(combo.Text,'kiedy',0));
opis.Caption:=INI.ReadString(combo.Text,'opis','');
D:=INI.ReadDate(combo.Text,'K_pow',0);
data:=Date;
R:=D-data;
if R=0 then
tim.Enabled:=True;
end;
i taki:
procedure TForm1.timTimer(Sender: TObject);
var G:TTime;
czas:TTime;
R:Real;
begin
LongTimeFormat:='HH:mm';
INI:=TINIFile.Create(GetP()+'plan_lekcjidane'+'dane_'+list.Items[list.itemindex]+'wyd.ini');
G:=INI.ReadTime(combo.Text,'G_pow',0);
czas:=Time;
R:=G-czas;
if R=0 then
ShowMessage(combo.Text+' - '+opis.Caption);
end;
I to ma być powiadamiacz. Ale jak daty się zgadzają, to sie nie wyświetla komunikat nawet jak godziny są równe.