Adding components to the toolbox (failure thereof)

Posted by GregHiggins on 03-Mar-2009 10:31

"There are no components in the assemby E:\mailit\lib\Mail.It.NET.dll that can be added to the toolbox"

Does this mean I can't work with these .Net components at all?

How does the toolbox decide what components it will work with and what components it won't work with?

All Replies

Posted by Matt Baker on 03-Mar-2009 11:02

There are a bunch of filters on what can be added to the toolbox. For any given class the following requirements have to be met.

Must not be abstract

Must be visible from outside it's own assembly (must be public)

Must implement System.ComponentModel.IComponent

Must have a default constructor (e.g. no parameters) although it may have other constructors.

Must not have the ToolboxItemAttribute set to false

Must not have DesignTimeVisibleAttribute set to false

Must not have ToolboxItemFilterAttribute.Require attribute

Must not have ToolboxItemFilterAttribute.Prevent attribute set to disallow certain designers (this filters out stuff that inherits from System.Windows.Forms.Form)

This thread is closed