Finding a Component's (ComponentModel.Component) Parent Form - 03-04-2004 , 02:27 AM
I'm working on a .net component (not a control) and need to find out what form the
component is contained in during runtime (DesignMode=False). With a control, there
is a parent property (and FindForm) to do this with, but no such luck with a
I was thinking that I might be able to iterate thru the Container.Components with
something like this with the Site.Name being the components name. This assumes that
a form is added to the container.components.
Dim c As IComponent
For Each c In Me.Container.Components
But this doesn't seem to work. Does anyone have any idea as to how I can determine
what form a component is placed on??
Thanks - JackRazz
Re: Finding a Component's (ComponentModel.Component) Parent Form - 03-04-2004 , 05:22 PM
"JackRazz" <JackRazz (AT) NotValid (DOT) com> wrote
well as a DesignMode property).
John.Saunders at SurfControl.com
|Thread Tools||Search this Thread|