Thema: Delphi Before and after events

Einzelnen Beitrag anzeigen

sdean

Registriert seit: 5. Dez 2009
64 Beiträge
 
#4

Re: Before and after events

  Alt 5. Dez 2009, 16:37
I reformed my Question as follows :

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


Delphi-Quellcode:
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-Quellcode:
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;
  Mit Zitat antworten Zitat