Maintain a form centered in screen

Add this line in the private part of the form to
capture the message :
Procedure
TForm1.FormResize ( Sender : TObject ) ;
Begin
With Form1 Do
Begin
Form1.Left := (
Screen.Width - Width ) Div 2 ;
Form1.Top := (
Screen.Height - Height ) Div 2 ;
End ;
End ;