G
Guest
hi,
i would like to add pictureboxes during runtime, but there should not be a
specific variable for each picturebox becouse i don't know how much it will
be. so i declared a collection referencing on one var declared as picturebox.
it works fine to add the controls this way. now i would like to implement one
picturebox click handle for each added picturebox and i have no idea how to
do this.
Friend WithEvents Device As PictureBox
Dim Devices As New Collection
.....
Device = New PictureBox
Devices.Add(Device, DeviceID)
Me.Controls.Add(Devices(DeviceID))
....
i would like to add pictureboxes during runtime, but there should not be a
specific variable for each picturebox becouse i don't know how much it will
be. so i declared a collection referencing on one var declared as picturebox.
it works fine to add the controls this way. now i would like to implement one
picturebox click handle for each added picturebox and i have no idea how to
do this.
Friend WithEvents Device As PictureBox
Dim Devices As New Collection
.....
Device = New PictureBox
Devices.Add(Device, DeviceID)
Me.Controls.Add(Devices(DeviceID))
....