⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.pas

📁 delphi编程实效百例的随书源代码 这是其中的界面外观部分
💻 PAS
字号:
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.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -