كود لتوليد لون كل ثانيه اضف تايمر واضبط الانترفال الى 1000 اى ثانيه واحده وضع الكود التالى فى الفورم وانظر للنتيجه
كود:
Public Class Form1
Dim n As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.BackColor = System.Drawing.ColorTranslator.FromOle(QBColor
)
n = n + 1
If n = 15 Then n = 0
End Sub
End Class
كود:
Public Class Form1
Dim n As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.BackColor = System.Drawing.ColorTranslator.FromOle(QBColor

n = n + 1
If n = 15 Then n = 0
End Sub
End Class