用API实现在MSN的信息提示
来源:互联网 发布:linux yum安装make 编辑:程序博客网 时间:2024/06/10 05:40
我是比较喜欢用MSN的,因为它的信息提示比较独特,所有的聊天软件都是弹出一个常规的WINDOWS对话框,而它却好像是从任务栏里冒出来的。想想了,在DELPHI这样的纯OOP工具里加一个API应该不难实现,花了十来分钟终于搞出来了,以下是实现方法:
1、建立一个APPLICATION,将两个按钮放置到主窗体FROM1中,分别为button1和button2。
button1.caption:='打开窗口';
button2.caption:='关闭窗口';
2、在file菜单项中的new中添加窗体form2,并且在project中的options里,将form2设置为Available froms。
3、以下是FORM2窗体内的控件及属性设置
form2.borderstyle:=bsNone;
添加panel1
panel1.align:=alclient;
panel1.bevellnner:=bvLowered;
可以在panel1内添加你想要的文字。
OK,打开FORM2的代码窗口,代码如下:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, jpeg, StdCtrls;
type
TForm2 = class(TForm)
Panel1: TPanel;
Image1: TImage;
Label1: TLabel;
procedure Label1Click(Sender: TObject);
procedure Image1Click(Sender: TObject);
private
{ Private declarations }
public
procedure Show;
procedure close;
{ Public declarations }
end;
var
Form2: TForm2;
implementation
procedure tform2.close;
begin
if AnimateWindow(Handle,200,AW_VER_POSITIVE+AW_HIDE)=false then
begin
showmessage('窗体退出出错');
free;
end;
inherited close;
end;
procedure tform2.Show;
begin
top:=430;
left:=560;
if AnimateWindow(Handle,200,AW_VER_NEGATIVE)=false then
begin
showmessage('窗体显示出错');
free;
end;
inherited show;
end;
{$R *.dfm}
以上红色的区域为具体实现特效的代码。为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的信息提示一模一样。
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 用API实现在MSN的信息提示
- 用API实现在MSN的信息提示
- Delphi中用API实现在MSN的信息提示
- [转]winform实现的仿Msn移动提示信息窗口
- 类似msn的右下角信息提示
- JS实现MSN提示弹出的效果
- C#实现仿msn提示消息在登录后只弹出一次的效果(downmoon)
- [转]页面外仿 MSN 弹出提示信息的脚本改进版(仅能在IE下运行!)
- 用css实现的提示信息
- C#实现类似MSN Messenger的弹出提示窗体
- 仿msn,右下角信息提示页
- purify的API和提示信息代号
- Flex3+ArcGIS+API改变鼠标停留在导航条时显示的提示信息
- 类似MSN的提示框
- MSN样式的消息提示
- Web的桌面提醒(Popup,类似msn,outlook等的信息提示)
- Web的桌面提醒(Popup,类似msn,outlook等的信息提示)
- Web的桌面提醒(Popup,类似msn,outlook等的信息提示)
- 妙用触发器有效管理MySQL数据库
- 实例详解CSS滤镜(7)Invert属性
- 使用静态数组应该注意的问题
- Mysql5写中文乱码问题解决
- 实例详解CSS滤镜(6)Glow属性
- 用API实现在MSN的信息提示
- 在MySQL中增添新用户权限的方法简介
- 资源文件的创建与使用
- 实例详解CSS滤镜(4)Chroma属性
- 教你维护MySQL安装的安全性和完整性
- 实例详解CSS滤镜(3)Blur属性
- DirectShow之接口实战篇(二)
- MySQL权限提升及安全限制绕过漏洞
- 实例详解CSS滤镜(2)Mask属性