ComponentTray.CreateComponentFromTool(ToolboxItem) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
重要
此 API 不符合 CLS 規範。
從指定的工具箱項目建立元件,將元件加入目前文件,並在元件托盤中顯示該元件的表示法。
public:
void CreateComponentFromTool(System::Drawing::Design::ToolboxItem ^ tool);
public void CreateComponentFromTool(System.Drawing.Design.ToolboxItem tool);
[System.CLSCompliant(false)]
public void CreateComponentFromTool(System.Drawing.Design.ToolboxItem tool);
member this.CreateComponentFromTool : System.Drawing.Design.ToolboxItem -> unit
[<System.CLSCompliant(false)>]
member this.CreateComponentFromTool : System.Drawing.Design.ToolboxItem -> unit
Public Sub CreateComponentFromTool (tool As ToolboxItem)
參數
- tool
- ToolboxItem
用來 ToolboxItem 建立一個元件。
- 屬性
備註
此方法會在嘗試建立元件並加入元件托盤前,檢查該項目是否符合 DesignTimeVisibleAttribute 標準。