Dim X As Integer = Int(1000 * Rnd())
Private Sub EndToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EndToolStripMenuItem.Click
End
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MessageBox.Show("Jay Mohundro version 0.0.01")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = X Then
MessageBox.Show("CONGRATULATIONS!!!")
End If
If TextBox1.Text < X Then
MessageBox.Show("You are too low!!!")
ElseIf TextBox1.Text < X - 25 Then
MessageBox.Show("You are way too low!!!")
End If
If TextBox1.Text > X Then
MessageBox.Show("You are too high!!!")
ElseIf TextBox1.Text > X + 25 Then
MessageBox.Show("You are way too high!!!")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim X As Integer = Int(1000 * Rnd())
End Sub
End Class
The problem is that whenever I play it the answer stays at 705. I'm new so I probably did something wrong. Any help and/or pointers are appreciated. Also if it matters I am using Microsoft Visual Basic 2008 Express Edition.

New Topic/Question
Reply



MultiQuote




|