手机
当前位置:查字典教程网 >编程开发 >Delphi >Delphi实现窗口文字淡入淡出渐变效果的方法
Delphi实现窗口文字淡入淡出渐变效果的方法
摘要:本文所述实例为Dlephi实现的窗口渐变文字效果,文字可以不停的变化,颜色由浅入深,由清淅变模糊,文字渐变的时间可在代码中自己调整。主要实现...

本文所述实例为Dlephi实现的窗口渐变文字效果,文字可以不停的变化,颜色由浅入深,由清淅变模糊,文字渐变的时间可在代码中自己调整。主要实现代码如下:

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Timer1: TTimer; Label1: TLabel; procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation var r,g,b:integer; {$R *.dfm} procedure TForm1.Timer1Timer(Sender: TObject); begin if (r<=255) and (g<=255) and (b<=255) then begin Label1.Font.Color:=RGB(r,g,b); //改变文字颜色 r:=r+1; g:=g+1; b:=b+1; end else begin r:=0; g:=0; b:=0; end; end; end.

【Delphi实现窗口文字淡入淡出渐变效果的方法】相关文章:

Delphi实现树型结构具体实例

Delphi实现窗体感知鼠标滑过并自动隐藏与显示窗口的方法

Delphi实现获取磁盘空间大小的方法

Delphi实现毫秒级别的倒计时实例代码

Delphi XE5 为Android应用制作签名的方法(图文)

Delphi实现木马文件传输代码实例

Delphi7中群发Email邮件的方法

delphi实现将BMP格式图形转化为JPG格式图形的方法

Delphi使用OpenGL2d绘图之画图片Bmp的方法

Delphi常用关键字用法详解

精品推荐
分类导航