Teks Berjalan Pada Form Caption


Tips & Trik Delphi, Tips Belajar Delphi, Belajar Delphi Online
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.

TransCODE Software



Satu pemikiran pada “Teks Berjalan Pada Form Caption

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s