begin Files.Delete(ClickedImage.Tag); ClickedImage.Destroy; for i:=ClickedImage.Tag to PhotoCount-2 do begin Photos[i]:=Photos[i+1]; Photos[i].Tag:=Photos[i].Tag-1; end; PhotoCount:=PhotoCount-1; SetLength(Photos,PhotoCount); FormResize(Sender); end;