getting the a list of controls on the form

  • Thread starter Thread starter Keith M
  • Start date Start date
K

Keith M

I am writting a non-visual component that can be dropped
on to a form. My problem is that I need to access the
other controls on this form. Is there any way to get to
the control collection property of the form from my
component?
 
I am inheriting from the Component class because I do not
have a visible control. My component is similar to the
Timer component. So I do not have a parent property.
 
Possibly you set the form as parent for your control? If yes - then check
Form.Controls collection.
Otherwise you might try Form.FromHandle method to get Form reference in
control.

HTH
Alex
 
Back
Top