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

Creates a component or control from the specified tool and adds it to the current design document within the bounds of the specified rectangle.

Syntax

protected void CreateTool (System.Drawing.Design.ToolboxItem tool, System.Drawing.Rectangle bounds)

Parameters

tool
The System.Drawing.Design.ToolboxItem to create a component from.
bounds
A System.Drawing.Rectangle indicating the location and size for the component created from the tool. The System.Drawing.Rectangle.X and System.Drawing.Rectangle.Y values of the System.Drawing.Rectangle indicate the design-time view screen coordinates of the upper-left corner of the component.

Remarks

The new component or control is positioned with its upper left corner at the location specified by the System.Drawing.Rectangle.X and System.Drawing.Rectangle.Y values of the bounds parameter. The size of the new component or control will be set to the values specified by the System.Drawing.Rectangle.Height and System.Drawing.Rectangle.Width properties of the bounds parameter.

Requirements

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