unit
U_kelinci;
interface
uses
Windows, Messages, SysUtils, Variants,
Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Image1MouseMove(Sender: TObject;
Shift: TShiftState; X,
Y: Integer);
procedure Image2Click(Sender: TObject);
procedure Image3Click(Sender: TObject);
procedure Image4Click(Sender: TObject);
procedure Image5Click(Sender: TObject);
procedure Image1Click(Sender: TObject);
procedure Image2MouseMove(Sender: TObject;
Shift: TShiftState; X,
Y: Integer);
procedure Image3MouseMove(Sender: TObject;
Shift: TShiftState; X,
Y: Integer);
procedure Image4MouseMove(Sender: TObject;
Shift: TShiftState; X,
Y: Integer);
procedure Image5MouseMove(Sender: TObject;
Shift: TShiftState; X,
Y: Integer);
procedure Edit1Change(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
LISTING PROGRAM SELENGKAPNYA>>
private
{ Private declarations }
public
{ Public declarations }
Procedure aktif;
Procedure nonaktif;
end;
var
Form1: TForm1;
implementation
{$R
*.dfm}
Procedure
Tform1.aktif;
begin
image1.Enabled:=true;
image2.Enabled:=true;
image3.Enabled:=true;
image4.Enabled:=true;
image5.Enabled:=true;
button2.Enabled:=true;
image1.Visible:=true;
image2.Visible:=true;
image3.Visible:=true;
image4.Visible:=true;
image5.Visible:=true;
end;
Procedure
Tform1.nonaktif;
begin
image1.Enabled:=false;
image2.Enabled:=false;
image3.Enabled:=false;
image4.Enabled:=false;
image5.Enabled:=false;
edit1.Enabled:=false;
button2.Enabled:=false;
timer1.Enabled:=false;
end;
procedure
TForm1.FormCreate(Sender: TObject);
begin
nonaktif;
end;
procedure
TForm1.Button1Click(Sender: TObject);
begin
aktif;
Timer1.Interval:=15000;
timer1.Enabled:=true;
end;
procedure
TForm1.Button2Click(Sender: TObject);
begin
close;
end;
procedure
TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
image1.Left:=random(left);
image1.Top:=random(top);
end;
procedure
TForm1.Image2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
image2.Left:=random(left);
image2.Top:=random(top);
Tidak ada komentar:
Posting Komentar