Entwickler-Ecke

Delphi Language (Object-Pascal) / CLX - Before and after events


sdean - Sa 05.12.09 18:28
Titel: Before and after events
i'm trying to implement a Before and After Event onTime :

how could i do an event before Min Value 'in this case 5 minutes ' ?


Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
Procedure Before(Min:Word); 
Var 
 Sm, // System Time ; Time to compare To 
 Mt: // My Time ; Time to compare with

S:String;
TTime;
begin 
S:='10:05:00';
Min:=5// 5 Miutes 
Sm:=Now;          // system time 
Mt:=StrToTime(S);//  My Time

Let's suppose the fowlling :
Sm:=10:00:00;  // System Time
Mt:=10:05:00; //  My Time
That means it's 5 minutes to rich Mt time '10:05:00'

if before 5 Minutes then 
ShowMessage('5 minutes to rich My Time '); 
}
 
end;


how could i do an event after Min Value 'in this case 5 minutes ' ?


Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
Procedure After(Min:Word); 
Var 
 Sm, // System Time ; Time to compare To 
 Mt: // My Time ; Time to compare with

S:String;
TTime;
begin 
S:='10:00:00';
Min:=5// 5 Miutes 
Sm:=Now;          // system time 
Mt:=StrToTime(S);//  My Time

Let's suppose the fowlling :
Sm:=10:05:00;  // System Time
Mt:=10:00:00; //  My Time
That means it's 5 minutes passed from Sm time '10:05:00'

if after 5 Minutes then 
ShowMessage('5 minutes passed from system time '); 
}

end;


ffgorcky - Di 08.12.09 20:58

I can't understand your Problem really good.
I think you're not really an english man, either,
because your Text '5 minutes to rich My Time' isn't really good understandable.
I Think you mean '5 minutes to reach the Time'.

Besser wäre es aber, wenn Du hier alles auf Deutsch schreibst. - Ist ja auch ein deutsches Forum!