memang seperti apa??
niih seperti ini nih:



bahannya cuma dua,cuma timer ama label doank
untuk kodenya,tinggal buka spoiler aja gan :
DONE beres dan semoga bermanfaat
memang seperti apa??
niih seperti ini nih:





unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
type
TForm1 = class(TForm)
Timer1: TTimer;
Label1: TLabel;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function UpTime: string;
const
ticksperday: Integer = 1000 * 60 * 60 * 24;
ticksperhour: Integer = 1000 * 60 * 60;
ticksperminute: Integer = 1000 * 60;
tickspersecond: Integer = 1000;
var
t: Longword;
d, h, m, s: Integer;
begin
t := GetTickCount;
d := t div ticksperday;
Dec(t, d * ticksperday);
h := t div ticksperhour;
Dec(t, h * ticksperhour);
m := t div ticksperminute;
Dec(t, m * ticksperminute);
s := t div tickspersecond;
Result := 'Uptime: ' + IntToStr(d) + ' Days ' + IntToStr(h) + ' Hours ' + IntToStr(m) +
' Minutes ' + IntToStr(s) + ' Seconds';
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Caption:=uptime;
end;
end.
Posted by
Andry Fadrie Kuswandani
at
11:00:00 PM
Labels: simple app
personal Andry's bloG © July 2009
Designed by : Andr¥ FK | on Power strong
0 comments:
Post a Comment