Code:
procedure TForm1.Button1Click(Sender: TObject);
var
i,
j: Integer;
Count: Integer;
Image: TImage;
GPI: TGPI;
begin
Count := 0;
for j:=1 to NumGPI div 10 do
for i:=1 to 5 do
if Count < NumGPI then
Begin
GPI := TGPI.Create;
GPI.LoadGPI({GPI[Count].FileName}GPIPath + FileList[Count]);
Image := TImage.Create(ScrollBox1);
with Image do
Begin
Parent := ScrollBox1;
Left := (8 + (i *(128 + 16))) - (128+16+4);
Top := (8 + (j *(128 + 16))) - (128+16+4);
Width := 128;
Height := 128;
Stretch := True;
Tag := Count;
Visible := True;
Picture.Bitmap := GPI.TGA;
end;
GPI.Free;
Inc(Count);
end;
end;
give that a go
Bookmarks