VB.NET Code:
Dim myRandomGenerator As System.Random 'roll1 Dim r1 As Integer 'roll2 Dim r2 As Integer myRandomGenerator = New System.Random Label1.Text = myRandomGenerator.Next(1, 7) Label2.Text = myRandomGenerator.Next(1, 7) r1 = Val(Label1.Text) 'val()change text to number 'change what control you want (textbox, label, ect) r2 = Val(Label2.Text) 'val()change text to number 'change what control you want(textbox, label, ect) Label3.Text = r1 + r2 'add the two random numbers
this is the easiest way i know of.. found a one random number generator on msdn student learning center and made a second one ^^


Reply With Quote
