Routing events

I have a vb form with many text boxes on it.
is there an elegant way to route all their events to one function (except calling the function in each text box event handler)

Thanks in advance.
Who is Participating?
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
use a control array
yes, control array is the way to go.
and just to confuse the issue, in VB.NET, this is ALMOST automatic.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

You create a control array by giving all of the text boxes the same name and setting the index property.

In the events, you'll see an additional parameter "Index" which tells you which one fired the event.
Hi pertman,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept emoreau's comment(s) as an answer.

pertman, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer
per recommendation

Community Support Moderator @Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.