Thanks, Gerry, I like the idea of a run-time warning; but, I am curious how, in general, one can detect the drag-drop of a Component on a Form at design-time. It appears that's impossible. This is the code I use to find the custom Extender Provider using the Type of the Container Form:
public IEnumerable EnumerateComponents(Type formtype, string targetname)
{
return formtype.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
.Where(finfo =>
finfo != null
&& typeof(IExtenderProvider).IsAssignableFrom(finfo.FieldType)
&& finfo.FieldType.Name == targetname);
}
cheers, Bill
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot