Forms Delphi

Title: To make the whole form behave like the title bar.
Question: How to make the whole form behave like the title bar.
Answer:
uses
Messages;
...
public
procedure WMNCHitTest(var Message: TWMNCHitTest); message
WM_NCHITTEST;
end;
...
procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
var
P: TPoint;
begin
inherited;
P := ScreenToClient(SmallPointToPoint(Message.Pos));
with imgTitle do
if (P.X = Left) and (P.X = Top) and
(P.Y Message.Result := htCaption;
end;