Hi,
Unfortunally there is no way of doing that, at least in that way, as
HelpProvider is a Component it does not is included in the Controls
collection, nor in any collection like Components where all the components
are listed
There is a components collection but it does not include ALL the components
that you include, I'm not very clear of why some are include and some not,
HelpProvider is not btw.
with that in mind then you have only one way to do what you want,
Reflection, this only works IF the class has a member of that type ( it will
works if you use the designer to include the HelpProvider)
of course, you could always create a property that return it, or null if the
form does not support it.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Susan" <Su***@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
I'm trying to get the list of all of the controls on a form which works
great except for getting the name of the HelpProvider. For instance:
for (int i = 0; i < this.Controls.Count; i++)
{
temp = this.Controls[i].Name;
}
will give me all of the textboxes, treeviews, etc on a form, but will not
give me the name of the helpprovier. Any suggestions of how to do this?
Thanks!