21 May 2007

MEMBUAT PROGRAM FORM TIAP 1 DETIK SEMAKIN BESAR

Semoga berhasil... Jika ada masalah kirim email ke : putu_dalungcity@yahoo.co.id
Nama : Abryan Tata Pangarsa
Web : abryantp.blogspot.com
Pada komponen timer, pada properties :
Timer1 Interval = 1000
Timer2 Interval = 2000
Timer3 Interval = 3000
Timer4 Interval = 4000
Timer5 Interval = 5000
Timer6 Interval = 6000
Sourcecode [ Membuat program form 1 detik semakin besar ] :
unit Abryan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TForm1 = class(TForm)
Timer1: TTimer;
Timer2: TTimer;
Timer3: TTimer;
Timer4: TTimer;
Timer5: TTimer;
Timer6: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure Timer5Timer(Sender: TObject);
procedure Timer6Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
form1.Color:=clWhite;
form1.Width:=100;
form1.Height:=100;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
form1.Color:=clRed;
form1.Height:= 200;
form1.Width:= 200;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
form1.Color:=clYellow;
timer1.Enabled:=false;
form1.Height:= 300;
form1.Width:= 300;
end;
procedure TForm1.Timer3Timer(Sender: TObject);
begin
form1.Color:=clGreen;
timer1.Enabled:=false;
timer2.Enabled:=false;
form1.Height:= 400;
form1.Width:= 400;
end;
procedure TForm1.Timer4Timer(Sender: TObject);
begin
form1.Color:=clFuchsia;
timer1.Enabled:=false;
timer2.Enabled:=false;
timer3.Enabled:=false;
form1.Height:= 500;
form1.Width:= 500;
end;
procedure TForm1.Timer5Timer(Sender: TObject);
begin
form1.Color:=clBlue;
timer1.Enabled:=false;
timer2.Enabled:=false;
timer3.Enabled:=false;
timer4.Enabled:=false;
form1.Height:= 600;
form1.Width:= 600;
end;
procedure TForm1.Timer6Timer(Sender: TObject);
begin
form1.Close;
end;
end.

COMMENTS :

Don't Spam Here

0 komentar to “MEMBUAT PROGRAM FORM TIAP 1 DETIK SEMAKIN BESAR”

 

Copyright © 2009 Fresh Themes Gallery | NdyTeeN. All Rights Reserved. Powered by Blogger and Distributed by Blogtemplate4u .