Resources Tab in VB.Net 2005

Heavenly

Well-known member
Joined
Aug 22, 2005
Messages
53
Location
Puerto Rico
Programming Experience
1-3
I had added 15 images to the Resources Tab on my project; these images are named Product_1….. To Product_15

I have a Button1 and a Picturebox1 on form1.

Question:

If this is the code for showing the image of Product_1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

PictureBox1.Image = My.Resources.Product_1

End Sub


What will be the correct code to address the images in My.Resources and show the next image (one by one, numerically) every time Button1 is clicked?

One Click shows image Product_1
On the Next Click shows image Product_2
Next Click shows image Product_3

So on and so forth….


Thanks for your help.
 
Back
Top