请问FOXMAIL中那个收到新邮件时会向上跳的小筐子是怎么做的?(20分)

  • 主题发起人 主题发起人 wangc2001
  • 开始时间 开始时间
W

wangc2001

Unregistered / Unconfirmed
GUEST, unregistred user!
最好有例子或是这种控件
sun_flower_2000@tom.com
 
我也想要,能送我一份吗?
wisewang#2yo.cn
 
lb_icesea79@163.com
 
unit U_popup;

interface

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

type
Tfrm_popup = class(TForm)
Panel1: TPanel;
Timer1: TTimer;
Label1: TLabel;
Image1: TImage;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Timer1Timer(Sender: TObject);
procedure Label1Click(Sender: TObject);
procedure getTaskHeight;
private
aHeight: integer; //任务栏的高度
public
{ Public declarations }
end;

var
frm_popup: Tfrm_popup;

implementation

{$R *.dfm}

procedure Tfrm_popup.FormCreate(Sender: TObject);
begin
getTaskHeight;
frm_popup.left := Screen.Width - frm_popup.Width;
frm_popup.top := Screen.height - frm_popup.height - aHeight;
AnimateWindow(Self.Handle, 1250, AW_VER_NEGATIVE or AW_ACTIVATE);

end;

procedure Tfrm_popup.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := cafree;
end;

procedure Tfrm_popup.Timer1Timer(Sender: TObject);
begin
with frm_popup do begin
if height > 0 then begin
top := top + 5;
height := height - 5;
end else close;
end;
end;

procedure Tfrm_popup.Label1Click(Sender: TObject);
begin
Timer1.Enabled := true;
Timer1.OnTimer(Sender);
end;

procedure Tfrm_popup.getTaskHeight;
var
abd: TAppBarData;
begin
abd.cbSize := sizeof(abd);
SHAppBarMessage(ABM_GETTASKBARPOS, abd);
aHeight := abd.rc.Bottom - abd.rc.top;
end;

end.
 
多谢,我看看先
 
接受答案了.
 
后退
顶部