unit Unit1 interface uses Windows Messages SysUtils Variants Classes G

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, jpeg;
type
TMyIcons = record
Image: TImage;
Angle: integer;
end;
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
Image2: TImage;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
MyIcons: array [0..18] of TMyIcons;
I: integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
for i:=1 to 8 do begin
MyIcons[i].Image:=TImage.Create(FOrm1);
MyIcons[i].Image.Width:=32;
MyIcons[i].Image.Height:=32;
MyIcons[i].Image.Picture:=Image2.picture;
MyIcons[i].Angle:=30;
end;
ShowMessage('Done!');
end;
end.