المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : كيفية جعل TLabel يرمش clignoter


HAFTARI
27-02-2008, 06:04 PM
السلام عليكم و رحمة الله تعالى وبركاته
بسرني أن أتقدم إليكم إخوتي بهذا المثال البسيط الذي يمكن من جعل TCaption يرمش -Clignote-

procedure TAFirst.Timer1Timer(Sender: TObject);
var clignot:Boolean;// تسمية المتغيرات
begin
إذا كان المتغير صحيح يصبح خطأ و العكس
clignot:=not clignot;
إذا كان المتغير صحيح يصبح اللون المتستعمل هو الأحمر
if clignot then Caption1.Font.Color:=clRed
إذا كان العكس
else
اللون المستعمل هو الأسود
Label1.Font.Color:=clBlack ;

end;
أتمنى أن يفيدكم إحوتي هذا المثال

merouane
27-02-2008, 07:27 PM
السلام عليكم

فكرة جميلة

لو تسمحلي بعرض فكرتي -- الهدف بلوغ Optimized

procedure TForm1.Timer1Timer(Sender: TObject);
begin
with label1.Font do
if Color = ClRed then color := clBlack
else color := clred
end;

بتعاون الجميع نحصل على نتائج أفضل

تحياتي :)

xinofix
27-02-2008, 11:27 PM
السلام عليكم
_________________[/SIZE]
إخفاء وإظهار المكون حسب قيمة Interval

TTimerTimer();
if label1.Visible then
label1.Visible = False else
label1.Visible := True;



كذلك يمكننا إخفاء وإظهار-رمش- عنوان الـForm

TTimerTimer();
var mycaption: string;
begin
mycaption := 'Net eXplorer 1.0'; {initialize the default form caption}
if myform.Caption = '' then
myForm.Caption := mycaption else
myForm.Caption := '';
end;


إظهار/إغلاق النوافذ بتأثيرات خاصة

{ AnimateWindow(myform.handle, AnimSpeed, AnimEffect); }

AnimateWindow(myform.handle, 2000, aw_slide); {aw_slide, aw_center, aw_blend}


:D

nabilkeb
20-12-2008, 10:39 PM
var clignot:Boolean;// تسمية المتغيرات
begin
إذا كان المتغير صحيح يصبح خطأ و العكس
clignot:=not clignot;
إذا كان المتغير صحيح يصبح اللون المتستعمل هو الأحمر
if clignot then Caption1.Font.Color:=clRed
إذا كان العكس
else
اللون المستعمل هو الأسود
Label1.Font.Color:=clBlack ;
انتبه للكود .

abualmonther
18-03-2009, 11:01 PM
procedure TForm1.Timer2Timer(Sender: TObject);
begin
if Label3.Font.Color=clBlack then Label3.Font.Color:=clRed
else
Label3.Font.Color:=clBlack
end;

paix144
09-09-2009, 03:54 AM
السلام عليكم
و هذا كود آخر

procedure TForm1.Timer1Timer(Sender: TObject);
begin

label1.Visible:=not(label1.Visible);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
timer1.Interval:=500;
end;