Hi,
I'm adding a row of pictureboxes to my form using this code (you can assume all variables have been properly declared)
There are already 11 pictureboxes so the new ones start at PictureBox12.
If I change the BackColor to (say) red, all boxes are displayed, so I know they are there.
However, none of 'em have an image. I can't add an image to 'em later in the programme, but I can change their backcolour.
Why can't I add an image? I know the image is valid, I use it elsewhere. I've tried changing the image to a different (valid) one, but it just doesn't happen.
Poppa
I'm adding a row of pictureboxes to my form using this code (you can assume all variables have been properly declared)
Code:
bxw = Me.Width \ 40 : bxh = CInt(bxw * 1.333)
x = 10 : y = PictureBox1.Location.Y + pbh + 25
For i = 12 To 52
Dim px As New PictureBox
px.Name = "PictureBox" & i.ToString
px.Height = bxh
px.Width = bxw
px.Location = New Point(x, y)
px.BackColor = Me.BackColor
px.Image = card(0)
px.Visible = True
Me.Controls.Add(px)
x += bxw + 1
Next
If I change the BackColor to (say) red, all boxes are displayed, so I know they are there.
However, none of 'em have an image. I can't add an image to 'em later in the programme, but I can change their backcolour.
Why can't I add an image? I know the image is valid, I use it elsewhere. I've tried changing the image to a different (valid) one, but it just doesn't happen.
Poppa