Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 4
 CreateToolCore Method
Collapse All/Expand All Collapse All
.NET Framework Class Library
ParentControlDesigner..::.CreateToolCore Method

Provides core functionality for all the CreateTool methods.

Namespace:  System.Windows.Forms.Design
Assembly:  System.Design (in System.Design.dll)
Visual Basic
Protected Overridable Function CreateToolCore ( _
    tool As ToolboxItem, _
    x As Integer, _
    y As Integer, _
    width As Integer, _
    height As Integer, _
    hasLocation As Boolean, _
    hasSize As Boolean _
) As IComponent()
C#
protected virtual IComponent[] CreateToolCore(
    ToolboxItem tool,
    int x,
    int y,
    int width,
    int height,
    bool hasLocation,
    bool hasSize
)
Visual C++
protected:
virtual array<IComponent^>^ CreateToolCore(
    ToolboxItem^ tool, 
    int x, 
    int y, 
    int width, 
    int height, 
    bool hasLocation, 
    bool hasSize
)
F#
abstract CreateToolCore : 
        tool:ToolboxItem * 
        x:int * 
        y:int * 
        width:int * 
        height:int * 
        hasLocation:bool * 
        hasSize:bool -> IComponent[] 
override CreateToolCore : 
        tool:ToolboxItem * 
        x:int * 
        y:int * 
        width:int * 
        height:int * 
        hasLocation:bool * 
        hasSize:bool -> IComponent[] 

Parameters

tool
Type: System.Drawing.Design..::.ToolboxItem
The ToolboxItem to create a component from.
x
Type: System..::.Int32
The horizontal position, in design-time view coordinates, of the location of the left edge of the tool, if a size is specified; the horizontal position of the center of the tool, if no size is specified.
y
Type: System..::.Int32
The vertical position, in design-time view coordinates, of the location of the top edge of the tool, if a size is specified; the vertical position of the center of the tool, if no size is specified.
width
Type: System..::.Int32
The width of the tool. This parameter is ignored if the hasSize parameter is set to false.
height
Type: System..::.Int32
The height of the tool. This parameter is ignored if the hasSize parameter is set to false.
hasLocation
Type: System..::.Boolean
true if a location for the component is specified; false if the component is to be positioned in the center of the currently selected control.
hasSize
Type: System..::.Boolean
true if a size for the component is specified; false if the default height and width values for the component are to be used.

Return Value

Type: array<System.ComponentModel..::.IComponent>[]()[]
An array of components created from the tool.

This is the only CreateTool method that can be overridden.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker