procedure TForm1.FormCreate(Sender: TObject);

var Animation:Cardinal;

begin

 Animation := AW_CENTER;

 AnimateWindow(form1.Handle,1000,

    Animation);

end;

 

 

--------------

Typy:

--

 0: Animation := AW_BLEND;

  1: Animation := AW_CENTER;

  2: Animation := AW_HOR_POSITIVE;

  3: Animation := AW_HOR_NEGATIVE;

  4: Animation := AW_VER_POSITIVE;

  5: Animation := AW_VER_NEGATIVE;

 

 

-------------\//////////////////

from other source !!!!!

 

 

unit Unit1;

 

interface

 

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, StdCtrls;

 

type

  TForm1 = class(TForm)

    ListBox1: TListBox;

    Edit1: TEdit;

    Label1: TLabel;

    Button1: TButton;

    Label2: TLabel;

    procedure Button1Click(Sender: TObject);

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

var

  Form1: TForm1;

 

implementation

 

uses Unit2;

 

{$R *.dfm}

 

procedure TForm1.Button1Click(Sender: TObject);

var Animation:Cardinal;

begin

  //determine which animation type was selected and assign

  //the corresponding constant to the animation variable

  case ListBox1.ItemIndex of

  0: Animation := AW_BLEND;

  1: Animation := AW_CENTER;

  2: Animation := AW_HOR_POSITIVE;

  3: Animation := AW_HOR_NEGATIVE;

  4: Animation := AW_VER_POSITIVE;

  5: Animation := AW_VER_NEGATIVE;

  end;

 

  //bring form2 to the front so you can see the animation

  form2.BringToFront;

  //hide form1

  form1.Hide;

  //use the AnimateWindow API call to animate form2

  AnimateWindow(form2.Handle,strtoint(edit1.text),

    Animation);

  //show form2

  form2.show;

end;

 

procedure TForm1.FormCreate(Sender: TObject);

begin

  //set a default animation type

  listbox1.ItemIndex := 0;

end;

 

end.

=====

Do form2 OnHide dodaj form1.show