Squirm
Centurion
I'm creating a number of pictureboxes dynamically:
All is well, the pictureboxes appear as they should. Now comes the part I'm having difficulty with. I want to have a procedure which handles the click event for all of these pictureboxes. Just one procedure.
How would I go about achieving this?
Visual Basic:
For i = 0 To 14
pPicture = New PictureBox()
cPics.Add(pPicture, CStr(i))
Me.Controls.Add(pPicture)
pPicture.Width = 60
pPicture.Height = 60
pPicture.Left = (iPositions(i) Mod 4) * 60
pPicture.Top = (iPositions(i) \ 4) * 60
pPicture.Visible = True
pPicture.Image = Image.FromFile("C:\EVBFpuzzle\" & CStr(i) & ".bmp")
Next i
All is well, the pictureboxes appear as they should. Now comes the part I'm having difficulty with. I want to have a procedure which handles the click event for all of these pictureboxes. Just one procedure.
How would I go about achieving this?