这是笨办法:
--------------
var
Form1: TForm1;
x,y,ox,ol,ot,oy:integer;
p:tpoint;
Down:boolean;
implementation
{$R *.dfm}
procedure TForm1.Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Down:=true;
getcursorpos(p);
ox:=p.x;
oy:=p.y;
ol:=Label1.left;
ot:=Label1.Top;
end;
procedure TForm1.Label1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Down:=false;
end;
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if Down then
begin
getcursorpos(p);
x:=p.x-ox;
y:=p.y-oy;
Label1.left:=ol+x;
Label1.top:=ot+y;
end;
end;