Hola jandro, también puedes hacerlo de esta forma:
Código Delphi
[-]
procedure TForm2.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
If GetCapture = 0 then
SetCapture(Self.Handle) ;
if Not PtInRect(Self.BoundsRect, Mouse.CursorPos) then Self.Hide;
end;
Saluditos