Программа Клон

procedure TForm1.Button1Click(Sender: TObject);

var i,j:byte;

begin

for i:=0 to 9 do

for j:=0 to 9 do

begin

image2.Canvas.StretchDraw(b[i,j],image5.picture.bitmap);

a[i,j]:=0;

end;

begin

image2.Canvas.StretchDraw(b[0,0],image1.picture.bitmap);

a[0,0]:=1;

image2.Canvas.StretchDraw(b[0,9],image3.picture.bitmap);

a[0,9]:=2;

image2.Canvas.StretchDraw(b[9,9],image1.picture.bitmap);

a[9,9]:=1;

image2.Canvas.StretchDraw(b[9,0],image3.picture.bitmap);

a[9,0]:=2;

end;

end;

procedure TForm1.FormCreate(Sender: TObject);

VAR I,J:BYTE;

begin

hod:=true;

for i:=0 to 9 do

for j:=0 to 9 do

begin

b[i,j].Left:=i*(image1.Width);

b[i,j].top:=j*(image1.Height);

b[i,j].Bottom:=b[i,j].Top+image1.Height;

b[i,j].Right:=b[i,j].Left+image1.Width

end;

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

form2.show;

end;

procedure TForm1.Button3Click(Sender: TObject);

begin

close;

end;

end.

unit Unit2;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, ComCtrls;

type

TForm2 = class(TForm)

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Button1: TButton;

Label5: TLabel;

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);

begin

close;

end;

end.

unit Unit3;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons;

type

TForm3 = class(TForm)

Label1: TLabel;

BitBtn1: TBitBtn;

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.BitBtn1Click(Sender: TObject);

begin

close;

end;

end.

unit Unit4;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons;

type

TForm4 = class(TForm)

BitBtn1: TBitBtn;

Label1: TLabel;

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form4: TForm4;

implementation

{$R *.dfm}

procedure TForm4.BitBtn1Click(Sender: TObject);

begin

close;

end;

end.

unit Unit5;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Grids;

type

TForm5 = class(TForm)

Label1: TLabel;

Button1: TButton;

Edit2: TEdit;

Label2: TLabel;

Label3: TLabel;

Edit1: TEdit;

Button2: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form5: TForm5;

implementation

uses unit1;

{$R *.dfm}

procedure TForm5.Button1Click(Sender: TObject);

begin

edit1.text:=inttostr(blue);

edit2.text:=inttostr(red);

end;

procedure TForm5.Button2Click(Sender: TObject);

begin

close;

end;

end.


Страница: