ComponentEventArgs クラス
アセンブリ: System (system.dll 内)
構文
ComponentEventArgs は、コンポーネント管理イベントすべてのルートとなるイベント引数クラスです。この種のイベントは、デザイナを使用してコンポーネントを追加または削除したときに発生します。
メモ |
---|
このクラスに適用される HostProtectionAttribute 属性の Resources プロパティの値は、SharedState です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。 |
ComponentEventArgs を作成する例を次に示します。
' This example method creates a ComponentEventArgs using the specified argument. ' Typically, this type of event args is created by a design mode subsystem. Public Function CreateComponentEventArgs(ByVal component As IComponent) As ComponentEventArgs Dim args As New ComponentEventArgs(component) ' The component that is related to the event: args.Component Return args End Function
// This example method creates a ComponentEventArgs using the specified argument. // Typically, this type of event args is created by a design mode subsystem. public ComponentEventArgs CreateComponentEventArgs(IComponent component) { ComponentEventArgs args = new ComponentEventArgs(component); // The component that is related to the event: args.Component return args; }
public: // This example method creates a ComponentEventArgs using the specified argument. // Typically, this type of event args is created by a design mode subsystem. ComponentEventArgs^ CreateComponentEventArgs( IComponent^ component ) { // The component that is related to the event: args.Component return gcnew ComponentEventArgs( component ); }
// This example method creates a ComponentEventArgs using // the specified argument. // Typically, this type of event args is created by a design mode subsystem. public ComponentEventArgs CreateComponentEventArgs(IComponent component) { ComponentEventArgs args = new ComponentEventArgs(component); // The component that is related to the event: args.Component return args; } //CreateComponentEventArgs
System.EventArgs
System.ComponentModel.Design.ComponentEventArgs
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- ComponentEventArgs クラスのページへのリンク