كيف نضع نص متحرك text مثل الاعلان داخل edt
#2
و عليكم السلام

أستخدمت مثال و لكن بـ Label أظنه أفضل من edit
كود :
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } function droite (i:Integer):string; function gauche (i:Integer):string; public { Public declarations } end; var Form1: TForm1; v:Integer; implementation {$R *.dfm} function tform1.droite (i:Integer):string; begin if Label1.Left < 350 then label1.Left:=Label1.Left +5 else v:=250; end; function tform1.gauche (i:Integer):string; begin if Label1.Left > 100 then label1.Left:=Label1.Left -5 else v:=200; end; procedure TForm1.Timer1Timer(Sender: TObject); begin case v of 200 : droite(200); 250 : gauche(250); end; end; procedure TForm1.FormCreate(Sender: TObject); begin v:=200; end; end.
ما عليك إلا أن تضبط البارمتر من اليمين إلى اليسار
بالتوفيق
أدبني الدهر فأراني نقص عقلي وإذا ما ازددت علما زادني علما بجهلي
الرد


الردود في هذا الموضوع
كيف نضع نص متحرك text مثل الاعلان داخل edt - بواسطة لؤي - 03-11-2011, 07:40 AM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم