ADMIN مدير منتدى الحلم
عدد المساهمات : 107 نقاط : 21155 تاريخ التسجيل : 08/11/2012 العمر : 44 الموقع : alksaey.yoo7.com
| موضوع: لعمل برنامج وميض وليبل متلون الثلاثاء ديسمبر 03, 2013 11:58 pm | |
| نكتب الكود التالي في حدث الكلاس Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label1.Text = "تصميم الاستاذ عادل الفيفي" 'النص Timer1.Enabled = True Timer1.Interval = 300 'سرعة التبدل Me.BackColor = Color.Wheat Timer2.Enabled = True Timer2.Interval = 330 'سرعة التحرك End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If Label1.ForeColor = Color.MediumSeaGreen Then Label1.ForeColor = Color.Violet Else Label1.ForeColor = Color.MediumSeaGreen End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If Label1.Location.X = 55 And Label1.Location.Y = 97 Then Label1.Left = Label1.Left + 10 ElseIf Label1.Location.X = 84 And Label1.Location.Y = 97 Then Label1.Left = Label1.Left - 10 End If
End Sub
End Class | |
|