次の方法で共有


Container.CreateSite メソッド

指定した IComponent 用にサイト ISite を作成し、そのサイトに特定の名前を割り当てます。

Protected Overridable Function CreateSite( _
   ByVal component As IComponent, _   ByVal name As String _) As ISite
[C#]
protected virtual ISite CreateSite(IComponentcomponent,stringname);
[C++]
protected: virtual ISite* CreateSite(IComponent* component,String* name);
[JScript]
protected function CreateSite(
   component : IComponent,name : String) : ISite;

パラメータ

  • component
    サイトを作成する IComponent
  • name
    component に割り当てる名前。名前の割り当てをスキップする場合は null 参照 (Visual Basic では Nothing) 。

戻り値

新規作成されたサイト。

解説

name が null 参照 (Visual Basic では Nothing) の場合、識別名を持たない IComponentContainer に追加されます。

このメソッドは、派生クラスでオーバーライドできます。 CreateSite をオーバーライドして、 ISite を実装しているクラスでカスタム実装を提供できます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

Container クラス | Container メンバ | System.ComponentModel 名前空間