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;
CheckBox1: TCheckBox;
ListBox1: TListBox;
ComboBox1: TComboBox;
GroupBox1: TGroupBox;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton1: TRadioButton;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private
{ Private declarations }
procedure Explode;
procedure Implode;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Explode;
begin
repeat
MoveWindow(
Handle, Left - 3, Top - 2, Width + 6, Height + 4, true);
application.ProcessMessages;
sleep(10);
until Top < 350
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Implode;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Show;
Explode;
end;
procedure TForm1.Implode;
var
y: Integer;
begin
y := GetSystemMetrics(SM_CYSCREEN)
div 2;
repeat
MoveWindow(
Handle, Left + 2, Top + 2, Width - 4, Height - 4, true);
application.ProcessMessages;
sleep(10);
until Top > y
end;
end.