Breaking News
Loading...
Saturday, March 19, 2011

Membuat Animasi Form

 unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormShow(Sender: TObject);
begin
        AnimateWindow(Handle,1000,AW_CENTER);
      //  AnimateWindow(Handle,1000,AW_BLEND);

end;

end.
Hasilnya form akan muncul dari tengah kecil terus membesar.
beberapa pilihan lain yang bisa dipakai
AW_SLIDE Uses slide animation, the default is AW_ROLL
AW_HOR_POSITIVE Animates the window from left to right, used with AW_SLIDE, or the default AW_ROLL
AW_HOR_NEGATIVE Animates the window from right to left, used with AW_SLIDE, or the default AW_ROLL
AW_VER_POSITIVE Animates the window from top to bottom, used with AW_SLIDE, or the default AW_ROLL
AW_VER_NEGATIVE Animates the window from bottom to top, used with AW_SLIDE, or the default AW_ROLL
AW_CENTER Expands the window from centerpoint outward when opening, negates any other direction flags
AW_BLEND Uses a fade in effect when opening, or a fade out effect when closing, ignored if AW_CENTER is also assigned
AW_ACTIVATE Activates the window, should not be used with AW_HIDE
AW_HIDE Hides the window, the default is a visible window

0 comments:

Post a Comment

Copyright © 2012 MORE THAN BLOGGER All Right Reserved
Designed by CBTblogger