unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Timer1: TTimer;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Old_Title : String;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.Title := ‘Selamat Belajar Delphi ‘;
Old_Title := Application.Title;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
temp : string;
begin
Temp := Application.Title;
Temp := Temp+Temp[1];
Temp := Copy(Temp,2,length(temp)-1);
Application.Title := temp;
Form1.Caption:=temp;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Enabled := NOT Timer1.Enabled;
if Timer1.Enabled = False then
begin
Application.Title := Old_Title;
Form1.Caption := Old_Title;
end;
end;
end.
Tuesday, January 4, 2011
Teks Berjalan Pada Form Caption
Tuesday, January 04, 2011
iwan RFID