O
olds350racer
I am a newbie but have come across a question I hope someone can help
with.
Given the following code for a UserControl:
' Declares in the class
Private intCount as Interger
Private myLabel() as Label
' Code in the Load event of my UserControl
Dim xCount as Integer
intCount = 10
redim myLabel(intCount)
For xCount = 0 to 10
myLabel(xCount) = New Label
Me.Controls.Add(myLabel(xCount))
Next
How would I respond to an event (ie-Click) of one of my myLabel
controls? Given that the control does not exist during the design
phase, there is no event to respond to. I know this sounds like a
newbie question, but I would appreciate if anyone could point me in
the right direction.
with.
Given the following code for a UserControl:
' Declares in the class
Private intCount as Interger
Private myLabel() as Label
' Code in the Load event of my UserControl
Dim xCount as Integer
intCount = 10
redim myLabel(intCount)
For xCount = 0 to 10
myLabel(xCount) = New Label
Me.Controls.Add(myLabel(xCount))
Next
How would I respond to an event (ie-Click) of one of my myLabel
controls? Given that the control does not exist during the design
phase, there is no event to respond to. I know this sounds like a
newbie question, but I would appreciate if anyone could point me in
the right direction.