ParentControlDesigner.CreateToolCore 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
重要
此 API 不符合 CLS 規範。
提供所有 CreateTool(ToolboxItem) 方法的核心功能。
protected:
virtual cli::array <System::ComponentModel::IComponent ^> ^ CreateToolCore(System::Drawing::Design::ToolboxItem ^ tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
protected virtual System.ComponentModel.IComponent[] CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
[System.CLSCompliant(false)]
protected virtual System.ComponentModel.IComponent[] CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize);
abstract member CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
override this.CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
[<System.CLSCompliant(false)>]
abstract member CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
override this.CreateToolCore : System.Drawing.Design.ToolboxItem * int * int * int * int * bool * bool -> System.ComponentModel.IComponent[]
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()
參數
- tool
- ToolboxItem
用來 ToolboxItem 建立一個元件。
- x
- Int32
在設計時視角座標中,若指定尺寸,則指工具左邊位置的水平位置;若未指定尺寸,則為工具中心的水平位置。
- y
- Int32
在設計時視角座標中,若指定尺寸,則為工具頂緣位置的垂直位置;如果未指定尺寸,則指工具中心的垂直位置。
- width
- Int32
工具的寬度。 若 hasSize 參數設為 false,則忽略此參數。
- height
- Int32
工具的高度。 若 hasSize 參數設為 false,則忽略此參數。
- hasLocation
- Boolean
true 若指定元件位置; false 如果元件要放在目前選取控制項的中心。
- hasSize
- Boolean
true 如果指定元件的大小; false 如果要使用元件的預設高度和寬度值。
傳回
由工具產生的一系列元件。
- 屬性
備註
這是唯一 CreateTool 可以被覆蓋的方法。