Making dynamic effects FORM

zhaozj2021-02-17  59

How to make animateform.

Do this esay, you need the only one api.

Unit animateform_unit;

Interface

Uses Windows, Messages, Sysutils, Classes, Graphics, Controls, Forms, Dialogs, Stdctrls;

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

Var Form1: TFORM1;

IMPLEMENTATION

{$ R * .dfm}

Procedure TForm1.FormShow (Sender: TOBJECT); Begin AnimateWindow (Handle, 500, AW_CENTER); // AW_BLEND, AW_CENTER / / AW_VER_POTIVE, AW_HOR_POSITIVE // AW_HOR_NEGATIVE, AW_VER_NEGATIVE

// ONLY WIN2000, WIN XP Support AW_BLEND VALUE (Alpha Blend Effect) End;

Procedure TForm1.FormCloseQuery (Sender: Tobject; Var canclose: Boolean); Begin AnimateWindow (Handle, 500, AW_Center OR AW_HIDE OR AW_BLEND);

End.

Li Yu Yang 2001.9.3 ly_liuyang@21cn.edu.cn

转载请注明原文地址:https://www.9cbs.com/read-28712.html

New Post(0)