CLICK HERE FOR THOUSANDS OF FREE BLOGGER TEMPLATES »
Sayısal Loto visual basicc etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Sayısal Loto visual basicc etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

11 Şubat 2008 Pazartesi

Sayısal Loto visual basicc kodu sayısal loto programı

Sayısal Loto
--------------------------------------------------------------------------------
Güzel bir numara sallama örneği; önce üç tane commmand buton koy sonra 6 Text box ve kodu kopyala


Private Sub Command1_Click()
Dim NumberList(5) As Integer
' Numaraların her zaman farklı olması için bunu yazıyoruz
Randomize Timer
Text1.Text = Int(Rnd * 49) + 1
Text2.Text = Int(Rnd * 49) + 1
Text3.Text = Int(Rnd * 49) + 1
Text4.Text = Int(Rnd * 49) + 1
Text5.Text = Int(Rnd * 49) + 1
Text6.Text = Int(Rnd * 49) + 1
'Sallanan numaraların aynı olma ihtimali çok yüksektir bundan dolyı bu kodları ekliyoruz
If Text1.Text = Text2.Text Or Text1.Text = Text3.Text Or Text1.Text = Text4.Text Or Text1.Text = Text5.Text Or Text1.Text = Text6.Text Then
Text1.Text = Int(Rnd * 49) + 1
End If
If Text2.Text = Text1.Text Or Text2.Text = Text3.Text Or Text2.Text = Text4.Text Or Text2.Text = Text5.Text Or Text2.Text = Text6.Text Then
Text2.Text = Int(Rnd * 49) + 1
End If
If Text3.Text = Text1.Text Or Text3.Text = Text2.Text Or Text3.Text = Text4.Text Or Text3.Text = Text5.Text Or Text3.Text = Text6.Text Then
Text3.Text = Int(Rnd * 49) + 1
End If
If Text4.Text = Text1.Text Or Text4.Text = Text2.Text Or Text4.Text = Text3.Text Or Text4.Text = Text5.Text Or Text4.Text = Text6.Text Then
Text4.Text = Int(Rnd * 49) + 1
End If
If Text5.Text = Text1.Text Or Text5.Text = Text2.Text Or Text5.Text = Text3.Text Or Text5.Text = Text4.Text Or Text5.Text = Text6.Text Then
Text5.Text = Int(Rnd * 49) + 1
End If
If Text6.Text = Text1.Text Or Text6.Text = Text2.Text Or Text6.Text = Text3.Text Or Text6.Text = Text4.Text Or Text6.Text = Text5.Text Then
Text6.Text = Int(Rnd * 49) + 1
End If
'Bu kodlar text boxlardaki değerlerin küçükten büyüğe sıralanmasını sağlar
NumberList(0) = CInt(Text1.Text)
NumberList(1) = CInt(Text2.Text)
NumberList(2) = CInt(Text3.Text)
NumberList(3) = CInt(Text4.Text)
NumberList(4) = CInt(Text5.Text)
NumberList(5) = CInt(Text6.Text)
For j = 0 To 5
For i = 0 To 4
If NumberList(i) > NumberList(i + 1) Then
temp = NumberList(i)
NumberList(i) = NumberList(i + 1)
NumberList(i + 1) = temp
End If
Next i
Next j
Text1.Text = NumberList(0)
Text2.Text = NumberList(1)
Text3.Text = NumberList(2)
Text4.Text = NumberList(3)
Text5.Text = NumberList(4)
Text6.Text = NumberList(5)
End Sub

Private Sub Command2_Click()
mesaj = MsgBox("Bu Program Şükrü Sanioğlu tarafından yapılmıştır (C). 2003-2004 | SS-Yazılım |", 10, "Sayısal Loto 6/49 Programı Hakkında")
End Sub

Private Sub Command3_Click()
End
End Sub