1. insert the following line into your form's "Private declarations" section (message handling procedure declaration):

 procedure WMNCHitTest(var Msg: TWMNCHitTest) ; message WM_NCHitTest; 
2. add the following code into the "implementation" section of your form's unit (where Form1 is assumed form name):
 procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest) ;
 begin    inherited;    if Msg.Result = htClient then Msg.Result := htCaption;
 end; 
posted on 2012-12-17 13:38  许小东  阅读(147)  评论(0编辑  收藏  举报