Hi all I am by far not a programmer i just know enough to get me by doing little project and stuff for me and my family. I am at the present moment trying to write a small program to help my daughter out with her multiplication tables. My problem is i need 2 different random number values to be set at the start of the program. ie. right now she is going from 1-6 on her test but use the nubers 1-6 she goes all the way to the number 10 to multiply them a little ie 1*1 thru 1*10 all the way to 6*1 thru 6*10 so i don't need it going to 7*8 how i was able to explain that clear enough. but i need it to be set at the start due to every week they are gonna work up a number till they get to 12 here is code i have I am sure it looks rough but i at least have a work model to play with feel free to correct and give any advice as i am trying to learn .net a little better.
VB.NET:
Public Class frmmul
Dim Answer As Integer
Dim B As Integer
Dim RandomClass As New Random()
Dim RandomNumber As Integer
Dim x As String
Private Sub frmadd_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RandomNumber = RandomClass.Next(0, 20)
Label1.Text = RandomNumber
Label2.Text = "X"
Label3.Text = RandomClass.Next(1, 5)
Answer = Val(Label1.Text * Label3.Text)
Label4.Text = x
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RandomNumber = RandomClass.Next(0, 20)
Label1.Text = RandomNumber
Label2.Text = "X"
Label3.Text = RandomClass.Next(1, 5)
If TextBox1.Text = Answer Then x = (x + 1) Else x = x
TextBox1.Text = ""
TextBox1.Focus()
End Sub
End Class