Is there a way to set the image from one PictureBox object to another? For example:
pictureboxA1.image = pictureboxB1.image
pictureboxA2.image = pictureboxB2.image
pictureboxA3.image = pictureboxB3.image
I did a similar thing with TextBox controls, but this code isn't working for me:
For i = 0 To 2
Me.Controls("picturebox" + "A" & i + 1).image = Me.Controls("picturebox" + "B" & i + 1).image
Next i
When I run this, I get an error stating .image is not a member of 'System.Windows.Forms.Control'
.
i know that is pictureboxA1.image = pictureboxB1.image.
but if i try like this
For i = 0 To 2
Me.Controls("picturebox" + "A" & i + 1).image = Me.Controls("picturebox" + "B" & i + 1).image
Next i
it says that image is not a member of controls. because i have to do this pictureboxA1.image = pictureboxB1.image, 21 times.
like pictureboxA1, pictureboxA2, ... 3, 4, 5, 6, 7 until 21.
and if i do it like this
pictureboxA1.image = pictureboxB1.image
i have to right the code 21 times and if i do it with for its just one time xD.
and i tryed .picture it says the same thing