制作动态效果的Form

2008-04-10 02:58:10来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

How to make animateform .

do this esay,you need 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_POSITIVE , 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;

end.

Liu Yang 2001.9.3 ly_liuyang@21cn.edu.cn

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Windows API函数使用技巧

下一篇:Delphi中获取打印机设备名和端口名