VisualBasic.Net / Sayi Bulma Oyunu

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Onaylı Üye
Katılım
1 Tem 2016
Mesajlar
149
Tepki puanı
15
Yaş
24
9 HİZMET YILI
Merhaba Arkadaşlar Ben adiyamanli02

Bu Konuda Size "Sayi Bulma Oyunu Yapma"'yı Öğreticem

Eğer Kod Yararlı Olur veya Kullanırsanız GüzelYorum Yeterlidir ...

Kod ;
HTML:
Dim sayi, s As Integer[/COLOR][/SIZE][/FONT][/CENTER]
[FONT=Trebuchet MS][SIZE=6][COLOR=#8000ff]
[CENTER]    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Randomize()
        sayi = Val(TextBox1.Text) + Rnd() * (Val(TextBox2.Text) - Val(TextBox1.Text))
        ListBox1.Items.Clear()
        TextBox4.Text = 0
        TextBox5.Text = 10
        s = 0
    End Sub
 
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If Val(TextBox3.Text) = sayi Then
 
            MsgBox(s + 1 & " hakta Bildiniz")
            s = 0
            TextBox4.Text = 0
            TextBox5.Text = 10
 
        End If
        If Val(TextBox3.Text) <> sayi Then
            s = s + 1
            TextBox4.Text = s
            TextBox5.Text = 10 - s
            ListBox1.Items.Add(Val(TextBox3.Text))
 
        End If
        If Val(TextBox4.Text) = 10 Then
            MsgBox("bilemediniz sayymyz " & sayi & " idi")
            ListBox1.Items.Clear()
            s = 0
        End If
    End Sub

 
Son düzenleme:
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst