Урок на делфи. 84 AnimateWindow


задание на delphi. Задание на Delphi. AnimateWindow для анимации при запуске окна

unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
AnimateWindow (handle, 5000, AW_BLEND);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
Label1.Caption:=IntToStr(Screen.Width);
Label2.Caption:=IntToStr(Screen.Height);
Form1.Left:= (Screen.Width - Form1.Width) div 2;
Form1.Top:= (Screen.Height - Form1.Height) div 2;
AnimateWindow (handle, 5000, AW_BLEND );
end;
end.



Скачать