Form'a 1 adet timer ekleyelim
sonra timerin invertialini 100 yapalım

Captionunu istediginiz gibi değiştirin formu yani.

Sonra timere 2 kere tıklayıp şu kodları giriyoruz.

Kod:
Private Sub Timer1_Timer() Label1.ForeColor = Rnd * 1677216 End Sub
Emeğe saygı..

Alıntı:
Gercek Mesajı Gonderen kadir2116
VB 2010

Public Class Form1
Dim a As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Randomize()
a = Int(Int(Rnd(a + 1) * 100) / 10)
If a = 1 Then Label1.ForeColor = Color.Green
If a = 2 Then Label1.ForeColor = Color.Blue
If a = 3 Then Label1.ForeColor = Color.Red
If a = 4 Then Label1.ForeColor = Color.Yellow
If a = 5 Then Label1.ForeColor = Color.DarkBlue
If a = 6 Then Label1.ForeColor = Color.Cyan
If a = 7 Then Label1.ForeColor = Color.Brown
If a = 8 Then Label1.ForeColor = Color.Black
If a = 9 Then Label1.ForeColor = Color.DarkOrange
If a = 10 Then Label1.ForeColor = Color.DeepPink
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
End Class

Alıntı:
Gercek Mesajı Gonderen hahana
Bir yolda benden o zaman.. VB.Net
PHP Code:
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = "0"
End Sub
Private Sub RandomColor()
Dim rand As New Random
Me.BackColor = Color.FromArgb(rand.Next(0, 256), rand.Next(0, 256), rand.Next(0, 256))
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim s As Integer = +10
Label1.Text = Label1.Text + s
RandomColor()
If Label1.Text = "1000" Then
Label1.Text = "0"
End If
End Sub
End Class





__________________