Delphi实现QQ右下角弹出信息窗口


本文整理自网络,侵删。

  

unit Unit1;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
PopForm:TForm;
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
PopForm:=TForm.Create(self);
PopForm.Width:=200;
PopForm.Height:=150;
PopForm.Name:='PopForm1';
PopForm.Left:=screen.Width-PopForm.Width;
PopForm.Top:=screen.Height;
PopForm.Show;
Timer1.Interval:=200;
Timer1.Enabled:=True;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
PopForm.Top:=PopForm.Top-10;
if PopForm.Top<screen.Height-PopForm.Height then
begin
Timer1.Enabled:=False;
PopForm.Free;
end;
end;

//需要说明的是只要触发按钮的单击事件 就可显示信息

相关阅读 >>

Delphi各个版本编译开关值

Delphi实现的sunday字符串搜索算法

Delphi xe5 android 使用system.zip单元释放资源文件

Delphi xe2 新增 system.zip 单元, 可用一句话压缩整个文件夹了

Delphi 7 编写一个ie右键菜单项目:自动保存图片

Delphi d10.x 安卓app开发中按返回键后程序不退出程序的方法

Delphi 获取当前输入法

Delphi窗口显示于parent控件上

Delphi 一行一行读取txt文件

qdac项目

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...