Bilgisayarin ne zamandan beri açik olduğunu anlamak için:
function Uptime: string;
var count,days,min,hours,seconds:longint;
begin
Count := GetTickCount();
Count := Count div 1000;
Days := Count div (24 * 3600);
if Days > 0 then
Count := Count - (24 * 3600 * Days);
Hours := Count div 3600;
if Hours > 0 then
Count := Count - (3600 * Hours);
Min := Count div 60;
Seconds := Count mod 60;
Result := IntToStr(Days)+' Days '+IntToStr(Hours)+ ' hours '+IntToStr(Min)+' minutes '+ IntToStr(seconds) +' seconds ';
end;end;
//Aşağıdaki kodu bir butona atayın.
begin
Label1.Caption:=Uptime;
end;
27 Mart 2010 Cumartesi
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder