Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alarm : boolean = false;
- procedure TForm1.ti_uhrTimer(Sender: TObject);
- var wtime : TTime;
- begin
- try
- lbl_clock.Caption := TimeToStr(Time);
- if alarm = true then
- begin
- lbl_alarm.Caption := 'Alarm!';
- end
- else
- begin
- lbl_alarm.Caption := '';
- end;
- if chb_wecker.Checked then
- begin
- wtime := StrToTime(ed_wecker.Text);
- if Time >= wtime then
- begin
- alarm := not alarm;
- end;
- end
- else
- begin
- lbl_alarm.Caption := '';
- end;
- except
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement