Autor Beitrag
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Fr 09.12.05 17:28 
Ich hab jezt mal angenommen die Form2 soll angezeigt werden wenn die zeit erreicht ist...

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
var
  Form1: TForm1;
  ADate,ATime: TDateTime;
implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Label1.Caption:= Timetostr(Time);
  Label2.Caption:= Datetostr(Date);
  ATime := StrToTime(Edit1.Text); // Das hat gefehlt
  ADate := StrToDate(Edit2.Text); // Das hat gefehlt
   if (Time >ATime) and (Date =ADate) then // Hier war ein Dreher bei Dir
 begin
  Timer1.Enabled:=False;
  Form2.Show;
 end;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
   ATime := StrToTime(Edit1.Text);
   ADate := StrToDate(Edit2.Text);
   if (ATime > Time) and (ADate >= Date) then
   ShowMessage('Wecker eingestellt')
   else
   ShowMessage('Ungültige Zeit/Datum');
end;


end.
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 11.12.05 00:24 
Immer noch zu Hoch ? ... dann lass es einfach ...