Delphi实现窗体动态创建效果

在uses中加入uses ShellAPI


procedure TForm1.FormCreate(Sender: TObject);
begin
   //AnimateWindow(self.Handle,800,AW_BLEND OR AW_ACTIVATE);//实现窗口的淡化效果

AnimateWindow(self.Handle,1000,AW_CENTER or AW_ACTIVATE);
//从中心扩散

//AnimateWindow(self.Handle,1000,AW_HOR_POSITIVE or AW_ACTIVATE);
//AnimateWindow(self.Handle,1000,AW_SLIDE or AW_HOR_POSITIVE or AW_ACTIVATE);
//水平从左到右

//AnimateWindow(self.Handle,1000,AW_HOR_NEGATIVE or AW_ACTIVATE);
//AnimateWindow(self.Handle,1000,AW_SLIDE or AW_HOR_NEGATIVE or AW_ACTIVATE);
//水平从右到左

//AnimateWindow(self.Handle,1000,AW_VER_POSITIVE or AW_ACTIVATE);
//AnimateWindow(self.Handle,1000,AW_SLIDE or AW_VER_POSITIVE or AW_ACTIVATE);
//垂直从上到下

//AnimateWindow(self.Handle,1000,AW_VER_NEGATIVE or AW_ACTIVATE);
//AnimateWindow(self.Handle,1000,AW_SLIDE or AW_VER_NEGATIVE or AW_ACTIVATE);
//垂直从下到上

end;