Loading halaman Tutorial Visual Basic, Delphi, PHP - Calon Programer : Animasi Form Delphi ...

Menampilkan form dengan animasi yang bervariasi bisa menggunakan fungsi dari file dll windows yaitu fungsi animate. Fungsi ini kita panggil di form on show


  1. unit Unit1;  
  2.   
  3. interface  
  4.   
  5. uses  
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  
  7.   Dialogs;  
  8.   
  9. type  
  10.   TForm1 = class(TForm)  
  11.     procedure FormShow(Sender: TObject);  
  12.   private  
  13.     { Private declarations }  
  14.   public  
  15.     { Public declarations }  
  16.   end;  
  17.   
  18. var  
  19.   Form1: TForm1;  
  20.   
  21. implementation  
  22.   
  23. {$R *.dfm}  
  24.   
  25. procedure TForm1.FormShow(Sender: TObject);  
  26. begin  
  27.         AnimateWindow(Handle,1000,AW_CENTER);  
  28.       //  AnimateWindow(Handle,1000,AW_BLEND);  
  29.   
  30. end;  
  31.   
  32. 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


Klik Like/share jika anda menyukai tulisan Share


Tagg :

0 Reply :

Posting Komentar

Jika ada pertanyaan atau request,Komentar pada tab blogger akan lebih memudahkan saya untuk membalasnya karena lebih mudah melakukan pengecekan komentar.