System.Windows.Forms.Design.ComponentTray.CreateComponentFromTool Method

Creates a component from the specified toolbox item, adds the component to the current document, and displays a representation for the component in the component tray.

Syntax

public void CreateComponentFromTool (System.Drawing.Design.ToolboxItem tool)

Parameters

tool
The System.Drawing.Design.ToolboxItem to create a component from.

Remarks

This method checks the item for an appropriate System.ComponentModel.DesignTimeVisibleAttribute before attempting to create the component and add it to the component tray.

Requirements

Namespace: System.Windows.Forms.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0