Arne,
I use Tim's approach a lot and it works well. So, you can give your controls
unique names and in code use the AddHandler method to set the method for
whatever event it is you are trying to handle. So, you would write a
function, say TextBox_Click(sender as Object, e as EventArgs)
Then, use the AddHandler method:
AddHandler mytextbox.Click, AddressOf TextBox_Click
Then, in your TextBox_Click routine, you could cast the sender object to a
textbox object and check its name.
So:
Dim myTxt as TextBox
if Typeof sender is TextBox then
myTxt = DirectCast(sender, TextBox)
end if
select case myTxt.Name.ToLower
case "myname"
' do something
case else
' do something else
end select
I wasn't looking at the docs when I wrote this so forgive if I've messed up
an parameters to functions
:)
Steve
"Arne Beruldsen" <Ar***********@discussions.microsoft.comwrote in message
news:E9**********************************@microsof t.com...
I'm a recent convert to VB.net from VB6...and I can't believe they don't
support control arrays. I have an app that uses a ton of Control
Arrays...mostly labels and text boxes.
I need some guidance on how to proceed...including any third party tools.
Thanks