Take a look at the code Visual Studio builds for you automatically and
places in the .Designer.cs class. Everything it's doing there you can do as
well to create dynamic objects on your forms.
> 1) How do I give each element a common interface so I can send it data
> from the main form
Probably create some interface that exposes the methods you want. Maybe
something like GetData(). You'll then need to create controls that extend
all the controls you want to be able to use on the form and have them
implement that interface.
> 2) How would I best implement a plugin system that would allow us to
> send a simple DLL to allow the user to extend the application with
> elements that may not have been available at compile-time?
Depends on what your needs are. Do the controls they build merely need to
have a common set of methods that your code can call? If so then you can
create an Interface that all the plugin controls must implement such as:
interface IDataControl
{
void LoadDataSet(DataSet dataSet);
}
Your users can then create new controls that implement this such as:
public partial class CustomControl1 : ComboBox, IDataControl
{
public CustomControl1()
{
InitializeComponent();
}
public void LoadDataSet(DataSet dataSet)
{
throw new Exception("The method or operation is not
implemented.");
}
}
On the other hand. If there are any base operations that each of these
controls must do that you want to implement for them then you would need to
create a base class that extends from Control that has that common
functionality in it. Your users would then extend that class to build their
new controls.
I would recommend avoiding the base class for this usage, though. By using
the interface route you allow your users to easily leverage existing
controls such as combo box, list views, etc. Wheras requiring them to
extend from your class burns their base class and would force them to
implement their own brand new versions of combo boxes, list views, etc.

Signature
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
>> Hi,
>
[quoted text clipped - 13 lines]
>
> Thanks!