pyh_jerry的方法不行!<br>可以用纪录坐标的方法(对于不规则窗口同样适用)<br>比如要让用户点击label1来移动窗口:<br>...<br> procedure Label1MouseDown(Sender: TObject; Button: TMouseButton;<br> Shift: TShiftState; X, Y: Integer);<br> procedure Label1MouseMove(Sender: TObject; Shift: TShiftState; X,<br> Y: Integer);<br>...<br>var<br> Form1: TForm1;<br> X1, Y1: Integer;<br>...<br>procedure TForm1.Label1MouseDown(Sender:TObject;Button:TMouseButton;<br> Shift: TShiftState; X, Y: Integer);<br>begin<br> X1 := X;<br> Y1 := Y;<br>end;<br><br>procedure TForm1.Label1MouseMove(Sender: TObject; Shift: TShiftState; <br> X, Y: Integer);<br>begin<br> if HiWord(GetAsyncKeyState(VK_LBUTTON)) > 0 then<br> begin<br> Form1.Left := Form1.Left + X - X1;<br> Form1.Top := Form1.Top + Y - Y1;<br> end;<br>end;<br>这样,无论怎样拖动,窗口和内容都是同时移动,不会显示虚框.