J
JackRazz
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
component.
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
Console.WriteLine(c.Site.Name)
Next
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
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
component.
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
Console.WriteLine(c.Site.Name)
Next
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