Judul Form Berjalan

unit Unit1;

interface

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

type
TForm1 = class(TForm)
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
// sumber : http://www.swissdelphicenter.ch/en/showcode.php?id=228

var
a: string;
procedure TForm1.FormCreate(Sender: TObject);
begin
a := ‘Title Form Berjalan’;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
i: Integer;
begin
Application.Title := a;
Form1.Caption     := a;
for i := 1 to (Length(a) – 1) do
a[i] := Application.Title[i + 1];
a[Length(a)] := Application.Title[1];
end;

end.

Tinggalkan komentar