Make a form moveable

 



Add this line in the private part of the form to capture the message :

 

Procedure WMNCHitTest ( Var Msg : TWMNCHitTest ) ; Message WM_NCHITTEST ;

 

And the procedure in the implementation :

 

Procedure TForm1.WMNCHitTest ( Var Msg : TWMNCHitTest ) ;

Begin

   Inherited ;

   If Msg.Result = htClient Then Msg.Result := htCaption ;

End ;


Back Home Foward