Source Code



Marquee in Delphi

  • anonymous
  • Jul 07' 13
  • Delphi
  • 567
  • 21
  • United States

Pernah melihat text berjalan di web, ya kita mengenalnya dengna istilah marquee. Di delphi kita juga bisa membuatnya dengan listing kode di bawah ini:

 

unit Umarquee;

interface

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

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormShow(Sender: TObject);
begin
Form1.Width:=Screen.Width;
Label1.Left:=Screen.Width;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
Label1.Left:=Label1.Left-5;
if Label1.Left < -(Label1.Width) then Label1.Left:=Screen.Width; 
end; 
end.

 

  • Tags :
comments powered by Disqus

Related Code

Internet Connection Check

TCP Connection

Message in DLL File

Get Computer Name



Category