Export (0) Print
Expand All

Container.CreateSite Method

Creates a site ISite for the given IComponent and assigns the given name to the site.

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

Parameters

component
The IComponent to create a site for.
name
The name to assign to component; or a null reference (Nothing in Visual Basic) to skip the name assignment.

Return Value

The newly created site.

Remarks

If name is a null reference (Nothing in Visual Basic) the IComponent is added to the Container without an identifying name.

This method can be overridden by a derived class. Implementors wishing to override CreateSite can provide a custom implementation through a class implementing ISite.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Container Class | Container Members | System.ComponentModel Namespace

Show:
© 2014 Microsoft