What I want to do is create an application that has an array that is randomly generated according to the users specifications.
for example they specify the dimensions into a textbox which then creates the specific size
I then want to be able to press another button 'PlayButton' which randomly splits the already generated values into 2 different list boxes where it is added up and who ever has the highest value is the winner
this is the code that I have already:
Public Sub NewButton_Click(sender As Object, e As EventArgs) Handles NewButton.Click
Try
Row = ColumnBox.Text
Column = RowBox.Text
Catch ex As InvalidCastException
MessageBox.Show("Dimensions are not valid")
End Try
Dim Array As Random = New Random(DateTime.Now.Millisecond)
Dim oTextbox As Label
For index1 As Integer = 0 To (Row - 1) Step 1
For index2 As Integer = 0 To (Column - 1) Step 1
oTextbox = New Label()
With oTextbox
.Name = "TextBox" & index1.ToString & index2.ToString
.Text = Array.Next(100)
.Width = Me.Width / 8
.Left = index1 * (Me.Width / 8)
.Top = index2 * .Height
End With
Panel1.Controls.Add(oTextbox)
Next index2
Next index1
ColumnBox.Text = "Columns"
RowBox.Text = "Rows"
End Sub