When i hit the start button i just get white boxes and no image for the dynamic and the image does not show for the random image i get a red x wondering if anyone can help me thanks!
Dim r As New Random
Dim s As String
Dim n As Integer
n = r.Next(0, 26)
s = "tile"
If n <= 9 Then s += "0"
s += n.ToString
pictray1.Image = My.Resources.Tile02
pictray1.Image = My.Resources.ResourceManager.GetObject(s)
s = Application.StartupPath & "tiles\" & s & ".jpg"
pictray1.ImageLocation = s
Dim i As Integer
Dim j As Integer
Dim buttonnum As Integer
Dim mybutton As New PictureBox
For i = 1 To 15
For j = 1 To 15
buttonnum = (j - 1) * 15 + i
mybutton = New System.Windows.Forms.picturebox
mybutton.Location = New System.Drawing.Point(i * 30, j * 30)
mybutton.Name = "Button" & buttonnum
mybutton.Size = New System.Drawing.Size(30, 30)
mybutton.Text = buttonnum
'mybutton.BackColor = Color.White
Select Case buttonnum
Case 1, 8, 15, 106, 120, 211, 218, 225
mybutton = image.fromfile("tripleword.jpg")
'mybutton.Image = My.Resources.TripleWord
'mybutton.BackColor = Color.red
Case 4, 12, 37, 39, 46, 53, 60, 93, 97, 99, 103, 109, 117, 123, 127, 129, 133, 166, 173, 180, 187, 189
mybutton.Image = My.Resources.DoubleLetter
'mybutton.BackColor = Color.LightBlue
Case 21, 25, 77, 81, 85, 89, 137, 141, 145, 149, 201, 205
mybutton.Image = My.Resources.TripleLetter
'mybutton.BackColor = Color.Blue
Case 17, 29, 33, 43, 49, 57, 65, 71, 155, 161, 169, 177, 183, 193, 197, 209
mybutton.Image = My.Resources.DoubleWord
'mybutton.BackColor = Color.Pink
End Select
Me.Controls.Add(mybutton)
Next
Next
End Sub