كيف اجعل لون خلفية الفورم يتغير بين الأزرق والأحمر بواسطة تايمر
سؤال بسيط من مبتدى
procedure TForm1.Timer1Timer(Sender: TObject); begin if form1.Color = clred then form1.Color := clblue else form1.Color := clred; end;
المرفق يقوم بنفس العملية
تم تعديل هذه المشاركة بواسطة rober في 15 نوفمبر 2008 في 03:05
I'm Away For Sometimes
I'll Finish My Works
Come Back Soon
More Study > More Search > More Try > More Learning > Great Success
مشكور أخي فقد كنت أبرمج ب vb6 تم انتقلت الى vb.net + الدلفي لأن الدلفي لغة قوية وتستحق الجهد
لاشكر على واجب
المهم أن تكون قد وجدت ما تبحث
لو أردت الكود بالفيجوال بيزك
Private Sub Timer1_Timer() If Form1.BackColor = &HFF& Then Form1.BackColor = &HFF0000 Else Form1.BackColor = &HFF& End If End Sub
أيضاً قمت بإرفاق الملف
أرجو الأستفادة
I'm Away For Sometimes
I'll Finish My Works
Come Back Soon
More Study > More Search > More Try > More Learning > Great Success
rober كتب:Private Sub Timer1_Timer() If Form1.BackColor = &HFF& Then Form1.BackColor = &HFF0000 Else Form1.BackColor = &HFF& End If End Sub
يمكن استبدال &HFF& و &HFF0000 بـvbRed و vbBlue لتكون اكثر وضوحاً للقارئ والمبرمج بعد ذلك
اقتباسIf A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut
Albert Einstein
مشكور على التوضيح
I'm Away For Sometimes
I'll Finish My Works
Come Back Soon
More Study > More Search > More Try > More Learning > Great Success
بالنسبة للفجوال 6 والدوت نت فليست لدي صعوبات فقط انا جديد في الدلفي وجزاكم الله خيرا