ALpMontana
КЯaL´da TaNıMaM КuяaL´da
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Math;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i,j,g:integer;
SayList:Array[1..49] of integer;
begin
i:=0;
for i := 1 to 49 do
begin
SayList:=i;
end;
for i := 1 to 6 do
begin
for g:= 0 to ControlCount -1 do
begin
Randomize;
j:=RandomFrom(SayList);
if (Components is TPanel ) then
TPanel(Components).caption:= inttostr(j);
end;
end;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Math;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i,j,g:integer;
SayList:Array[1..49] of integer;
begin
i:=0;
for i := 1 to 49 do
begin
SayList:=i;
end;
for i := 1 to 6 do
begin
for g:= 0 to ControlCount -1 do
begin
Randomize;
j:=RandomFrom(SayList);
if (Components is TPanel ) then
TPanel(Components).caption:= inttostr(j);
end;
end;
end;
end.