我做过的。并不困难。
procedure TForm1.openimage;
begin
if (image1.Picture.Width>image1.width)or(image1.Picture.height>image1.height)
then
image1.cursor:=crSizeAll;
end;
procedure TMyBook.Image1MouseDown(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Integer);
begin
mx:=x;
my:=y;
if image1.cursor=crSizeAll
then
begin
mb:=true;
image1.Align:=alnone;
end;
end;
procedure TMyBook.Image1MouseMove(Sender: TObject;
Shift: TShiftState;
X,
Y: Integer);
begin
if mb=true then
begin
//image1.cursor:=crSizeAll;
image1.left:=image1.left-mx+x;
image1.top:=image1.top-my+y;
end;
end;
procedure TMyBook.Image1MouseUp(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Integer);
begin
mb:=false;
//image1.cursor:=crdefault;
end;