VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A basic number gussing game // It does not include a inputbox like most programs of number guess //

by Basic Code Man (2 Submissions)
Category: Games
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Tue 9th August 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A basic number gussing game // It does not include a inputbox like most programs of number guess // It Also is difuclut to do because the

Rate A basic number gussing game // It does not include a inputbox like most programs of number guess //



'Make a Txtbox
'
'D.F.T.E (Dont Forget To Eat)
'
'make the textbox name txt1
'make the command button name cmd1
'
Private Sub CommandButton1_Click()
    Static num As Integer
    Dim num As Integer
        Randomize
    Dim r
        r = (Int(Rnd * 10) + 1)
        '
            If txt1.Text = r Then
                MsgBox ("Great job! it only took you " & num & " try(s) to guess number")
            Else
                MsgBox "Sorry wrong"
                    num = num + 1
            End If
End Sub
'I would have put a inputbox into the code but this way seems kinda
'Differnt

Download this snippet    Add to My Saved Code

A basic number gussing game // It does not include a inputbox like most programs of number guess // Comments

No comments have been posted about A basic number gussing game // It does not include a inputbox like most programs of number guess //. Why not be the first to post a comment about A basic number gussing game // It does not include a inputbox like most programs of number guess //.

Post your comment

Subject:
Message:
0/1000 characters