这个简单,不就和winamp 一样吗。
先定义全局变量 x_Start ,y_Start :Integer;
var
p :Tpoint;
begin
if WindowState =wsMaximized then exit;
GetCursorPos(p);
if (p.x -x_Start >11) or (p.x - x_Start <0)then
begin
if (Screen.Width - (p.x -x_Start +Width) >11) or (Screen.Width -( p.x - x_Start+Width) <0)then
Left:=p.x -x_Start
else
Left :=Screen.width -Width
end
else
Left :=0;
if (p.y -y_Start >11)or (p.y - y_Start <0) then
if (Screen.Height - p.y +y_Start -Height>11)or (Screen.Height - p.y +y_Start -Height <0) then
top :=p.y - y_Start
else
top :=Screen.Height -Height
else
top :=0;
end;
就给你这么多提示,其它你自己想!