Heavenly
Well-known member
Need Help with this code:
This is what I have:
Every time I click on button1:
I call this sub:
The problem is that I just do not know how to increment the variable and the array (PictureBox1, arrProductNumber(0))so the next time I click, my arguments should be (PictureBox2, arrProductNumber(1))
I thought about putting this on button1 click event:
But I’m not sure if this is correct and I have not idea what to do with the Picturebox1. Can anyone give me a suggestion?
Thanks
This is what I have:
Every time I click on button1:
VB.NET:
DisplayPhoto(PictureBox1, arrProductNumber(0))
VB.NET:
Sub DisplayPhoto(ByVal PhotoFrame As PictureBox, ByVal j As Integer)
PhotoFrame.Image = System.Drawing.Image.FromFile(Application.StartupPath & "\photos\" & j & ".jpg")
End Sub
I thought about putting this on button1 click event:
VB.NET:
arrProductNumber(0) = arrProductNumber(0) + 1
Thanks