Stephen,
When you dynamically create the control, bind the OnGotFocus event to a
method. When the control is selected, the control reference is sent in the
sender of the fired event. Just cast the sender object to your control type
using
obj1 x = sender as obj1; (where obj1 is the type)
and then check if x is null. If not null then the cast was successful, and
you can do work on the control.
Rick D.
Contractor
"St******************@gmail.com" wrote:
I have a windows form that has a panel on it. At runtime a custom
control is added multiple times to this panel. (anywhere from 1-50 of
them are added). I am trying to figure out how I can "select" just one
of these controls. I want this to lead to the ability to move the
controls up and down and insert/delete controls based on the current
control "selected"...
Any help/advise?
Thanks.