拷贝别人的,祝君早日结贴。private procedure WmNCHitTest(var Msg : TWMNCHitTest); message WM_NCHITTEST;。。。。。procedure TfrmClass.WmNCHitTest(var Msg: TWMNCHitTest);const v=10; //border widthvar p:TPoint;begin if self.FFormIsMax then exit; p:=Point(Msg.XPos,Msg.YPos); p:=ScreenToClient(p); //if PtInRect(Rect(0,0,v,v),p) then // Msg.Result:=HTTOPLEFT if PtInRect(Rect(Width-v,Height-v,Width,Height),p) then Msg.Result:=HTBOTTOMRIGHT //else if PtInRect(Rect(Width-v,0,Width,v),p) then // Msg.Result:=HTTOPRIGHT else if PtInRect(Rect(0,Height-v,v,Height),p) then Msg.Result:=HTBOTTOMLEFT else if PtInRect(Rect(v,0,Width-v,v),p) then Msg.Result:=HTTOP else if PtInRect(Rect(0,v,v,Height-v),p) then Msg.Result:=HTLEFT else if PtInRect(Rect(Width-v,v,Width,Height-v),p) then Msg.Result:=HTRIGHT else if PtInRect(Rect(v,Height-v,Width-v,Height),p) then Msg.Result:=HTBOTTOM;end;