type tddhsizebutton=class(tbutton) public PRocedure WmNcHitTest(var msg:TWmNcHitTest); message wm_NcHitTest; end;
procedure TDdhSizeButton.WmNcHitTest(var msg:TWmNcHitTest); var pt:tpoint; begin pt:=point(msg.xpos,msg.ypos); pt:=ScreentoClient(pt); if (pt.x<5) and (pt.y<5) then msg.Result:=httopright elseif (pt.x>width-5) and (pt.y<5) then msg.Result:=httopright elseif (pt.x >width-5) and (pt.y>height-5) then msg.Result:=htbottomright elseif (pt.x<5) and (pt.y>height-5) then msg.Result:=htbottomleft elseif (pt.x<5) then msg.Result:=htleft elseif (pt.y<5) then msg.Result:=httop elseif (pt.x>width-5) then msg.Result:=htright elseif (pt.y>height-5) then msg.Result:=htbottom else inherited; end;