DesignSurface.CreateComponent(Type) Méthode

Définition

Attention

CreateComponent has been replaced by CreateInstance and will be removed after Beta2

Crée une instance d'un composant.

protected public:
 virtual System::ComponentModel::IComponent ^ CreateComponent(Type ^ componentType);
[System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")]
protected internal virtual System.ComponentModel.IComponent CreateComponent (Type componentType);
[System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")]
protected internal virtual System.ComponentModel.IComponent? CreateComponent (Type componentType);
[<System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")>]
abstract member CreateComponent : Type -> System.ComponentModel.IComponent
override this.CreateComponent : Type -> System.ComponentModel.IComponent
Protected Friend Overridable Function CreateComponent (componentType As Type) As IComponent

Paramètres

componentType
Type

Type du composant à créer.

Retours

Nouveau composant qui vient d'être créé.

Attributs

Exceptions

componentType a la valeur null.

Le IDesignerHost joint à DesignSurface a été supprimé.

Remarques

La CreateComponent méthode est appelée par la méthode de l’aire de CreateComponent conception pour créer un instance d’un composant. Le composant doit être créé et ajouté au conteneur public sur l’aire de conception.

S’applique à