Hello Tim,
Thanks for the suggestions. I am using Visual Studio .NET 2003, and my
controls (base and derived controls) are in an assembly called MI.UI.dll. I
have tried the following with my base control:
<System.ComponentModel.ToolboxItem(False)> _
Public Class MICompositeControlBase
Inherits System.Windows.Forms.UserControl
....
However, this base control still shows up in the Toolbox (when I reference
the MI.UI project directly) along with the other controls, or NOTHING shows
up in the Toolbox (when I reference the compiled MI.UI.dll assembly). This
appears to be a problem for other people, as described here:
http://groups.google.com/group/micr...a0e?q=toolboxitem&_done=/groups?q=toolboxitem
and here:
http://www.lemanix.com/nick/archive/2005/02/08/1656.aspx
I have also tried making the base class abstract (MustInherit in VB.NET),
but this does not hide the base control from the Toolbox either. In
addition, this has the unfortunate sideeffect that I cannot any longer open
the designer for the derived controls, because of this message:
An error occurred while loading the document. Fix the error, and then try
loading the document again. The error message follows: The designer must
create an instance of type 'MI.UI.MICompositeControlBase' but it cannot
because the type is declared as abstract.
- David McClelland