Forms Delphi

Title: Close the form con trasparency.
Question: In order to create a beautiful graphical effect

Answer:
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var
CicloClose, Trasparenza : 0..255;
begin
if AlphaBlend=False then
begin
AlphaBlendValue:=255;
AlphaBlend:=True;
end;
Trasparenza:=AlphaBlendValue;
for CicloClose := Trasparenza downto 0 do
begin
AlphaBlendValue := CicloClose;
Application.ProcessMessages;
end
end;