System.Windows.Forms.Design.ParentControlDesigner.CreateTool Method

Creates a component or control from the specified tool and adds it to the current design document at the specified location.

Syntax

protected void CreateTool (System.Drawing.Design.ToolboxItem tool, System.Drawing.Point location)

Parameters

tool
The System.Drawing.Design.ToolboxItem to create a component from.
location
The System.Drawing.Point, in design-time view screen coordinates, at which to center the component.

Remarks

The new component or control is positioned around the location specified by the location parameter. This method uses the default size for the tool's component, if the component has a default size.

To specify a location and size for the component or control, use the appropriate overloaded ParentControlDesigner.CreateTool(System.Drawing.Design.ToolboxItem) method.

Requirements

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