Animationd'une forme a son apparition API 100%
Source / Exemple :
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls ;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
AnimateWindow(Form1.Handle, 1000, AW_HOR_POSITIVE or AW_HOR_NEGATIVE or AW_Hide);
AnimateWindow(Form1.Handle, 1000, AW_HOR_POSITIVE or AW_HOR_NEGATIVE or AW_CENTER);
AnimateWindow(Form1.Handle, 1000, AW_HOR_NEGATIVE or AW_HOR_POSITIVE or AW_Hide);
AnimateWindow(Form1.Handle, 1000, AW_HOR_POSITIVE or AW_HOR_NEGATIVE or AW_SLIDE);
AnimateWindow(Form1.Handle, 1000, AW_VER_POSITIVE or AW_HIde);
AnimateWindow(Form1.Handle, 1000, AW_VER_NEGATIVE or AW_SLIDE);
end;
end.
//---------------DFM---------------
object Form1: TForm1
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'AnimatedWindow'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 216
Top = 144
Width = 105
Height = 25
Caption = 'Click'
TabOrder = 0
OnClick = Button1Click
end
end
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.