unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> procedure AnimatedHide;<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.AnimatedHide;<br>var<br> rPt1, rPt2: TPoint;<br>begin<br> rPt1 := ClientToScreen( ClientRect.TopLeft );<br> rPt2 := ClientToScreen( ClientRect.BottomRight );<br><br> DrawAnimatedRects(<br> Handle,<br> IDANI_CAPTION,<br> Rect( rPt1.X, rPt1.Y, rPt2.X, rPt2.Y ),<br> Rect( 0{Screen.Width}, Screen.Height, 0{Screen.Width}, Screen.Height ) );<br> Hide;<br>end;<br><br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> AnimatedHide;<br>end;<br><br>end.<br>