然后再加上这段程序:
procedure TForm1.Image1EndDock(Sender, Target: TObject; X, Y: Integer);
var
pt :TPoint;
begin
if Image1.Floating then
begin
pt := self.ScreenToClient(Image1.ClientToScreen(Point(0,0)));
Image1.parent := self;
Image1.Top := pt.y;
Image1.Left := pt.x;
end;
enda