以上红色的区域为具体实现特效的代码。为FORM1添加如下代码即可:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
var
mesfrm:tform2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
mesfrm:=tform2.Create(application);
mesfrm.Show;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
mesfrm.close;
end;
end.
OK,运行程序你已经可以看到效果了,不过记得将显示器设为800*600象素呵。
由于制作时间较短,只实现了基本的效果,但稍加修改便可和MSN的信息提示一模一样。