Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

How To Make A Simple Game In Visual Basic 2008

Loading...

Sign in or sign up now!
91,332
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 1, 2008

Visual Basic 2008 Game a guess the number game. it really works and soz for the stuff ups.
Codes:

Button1:
Dim Therandom As New Random
If RadioButton1.Checked = True Then
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label1.Text = Therandom.Next(1, 5)
If TextBox1.Text = Label1.Text Then
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU ARE CORRECT!!"
Button1.Enabled = False
TextBox1.Enabled = False
Else
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU LOSE!!"
Button1.Enabled = False
TextBox1.Enabled = False
End If
ElseIf RadioButton2.Checked = True Then
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label1.Text = Therandom.Next(1, 15)
If TextBox1.Text = Label1.Text Then
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU ARE CORRECT!!"
Button1.Enabled = False
TextBox1.Enabled = False
Else
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU LOSE!!"
Button1.Enabled = False
TextBox1.Enabled = False
End If
ElseIf RadioButton3.Checked = True Then
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label1.Text = Therandom.Next(1, 50)
If TextBox1.Text = Label1.Text Then
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU ARE CORRECT!!"
Button1.Enabled = False
TextBox1.Enabled = False
Else
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU LOSE!!"
Button1.Enabled = False
TextBox1.Enabled = False
End If
End If

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 40 dislikes

Link to this comment:

Share to:
see all

All Comments (204)

Sign In or Sign Up now to post a comment!
  • I found basic complicated, I use Game Maker 8 at the moment. I used this video to get the basics off /watch?v=1_xUqT4FBYs But then I used the tutorials on the yoyogames website.

  • It works!!

  • finaly i done it thanks man

  • damn you have the code in the discription i wrote all that stuff and now i saw the code here -_- i have some problems with the New Game button

  • @hamstertjes12345

    I have a code which is written by me:

    Label3.Visible = False TextBox1.Enabled = True Button1.Enabled = True Label1.Text = 0 RadioButton1.Checked = False RadioButton2.Checked = False RadioButton3.Checked = False TextBox1.Text = 0 End Sub

  • where is the code for button 2?

  • Thanksss !!!:)

  • I have it working. I even modified my game to where it talks. But... I had to type the code for play again which was unpleasent...

  • It worked great! Thanks =)

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more