How To Make A Game On Visual Basic 2008

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
8,209
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 11, 2008

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 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 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Label1.Text = "0" Label1.Visible = False Label2.Visible = False Label3.Visible = False Button1.Enabled = True TextBox1.Enabled = True TextBox1.Text = "" End Sub
End Class

Category:

People & Blogs

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Top Comments

  • :0 lots of codes!

  • thank you very much buddy

see all

All Comments (32)

Sign In or Sign Up now to post a comment!
  • Fail, this is one of the assignment projects in the book that you buy with for the application when it was still up for sale, its called the "Random Number Project". I know cause i do this at school.

  • Heard song

    Liked video

  • good game!

  • oops you paste all the code without space or enter

  • doesn't work

  • how do you make the size?

  • Lol

    You kinda fail bc can do this much easyer

  • Thanks for explaining ABSOLUTELY NOTHING about the programming of the application, and just telling us to copy and fucking paste it like lab monkeys.

  • THATS A HELL LOT OF ENABLED , TRUE AND FALSE !

  • whats your xbox live name

  • @HabboHotelCracker

    it does your just noob

  • your code needs comments

  • dont work loser

  • @saaf3005

    You have just one problem with that code, otherwise it is all correct, try this instead

    dim rnd as new random

    label1.text = rnd.next(1,10)

    if textbox1.text = label1.text then

    label2.text = "Win"

    else

    Label2.text = "Lose"

  • YOUR MOM IS LAME!!! (i would know)

  • omg

    dim rnd as new radom

    label1.text = rnd.next(0,11)

    if textbox1.text = label1.text then

    label2.text = "Lose"

    else

    label2.text = "Win"

    thats a lot of easier!!

    just do rnd.next (0,11) at easy, rnd.next (0,51) at medium and (0, 101) at hard ...

  • haha thats right JoshandAll

    ^^

  • Did not WORK

  • wow that kool but you dont hear anything

  • hahah lol very good program

  • because you hit the hq button the audio button enables

  • Then why do you use it...?

  • label , and then set the lettertype to 30 or something like that ...

  • YOUTUBE IS LAME

  • stole by envrionmentalred53

Loading...

Alert icon
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