ToolboxComponentsCreatingEventHandler デリゲート
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Delegate Sub ToolboxComponentsCreatingEventHandler ( _ sender As Object, _ e As ToolboxComponentsCreatingEventArgs _ )
public delegate void ToolboxComponentsCreatingEventHandler ( Object sender, ToolboxComponentsCreatingEventArgs e )
public delegate void ToolboxComponentsCreatingEventHandler ( Object^ sender, ToolboxComponentsCreatingEventArgs^ e )
/** @delegate */ public delegate void ToolboxComponentsCreatingEventHandler ( Object sender, ToolboxComponentsCreatingEventArgs e )

ToolboxComponentsCreatingEventHandler デリゲートを作成する場合は、イベントを処理するメソッドを識別してください。イベントをイベント ハンドラに関連付けるには、デリゲートのインスタンスをイベントに追加します。デリゲートを削除しない限り、そのイベントが発生すると常にイベント ハンドラが呼び出されます。イベント ハンドラ デリゲートの詳細については、「イベントとデリゲート」を参照してください。

次に示すのは、ToolboxItem の ComponentsCreating イベントにイベント ハンドラをアタッチするメソッドの実装例です。このコードではまた、ToolboxComponentsCreatingEventHandler イベント ハンドラ メソッドも実装されています。このメソッドは、ComponentsCreating イベントによってイベント ハンドラが呼び出されたときに、新しいコンポーネントの種類名を Console に書き込みます。
Public Sub LinkToolboxComponentsCreatingEvent(ByVal item As ToolboxItem) AddHandler item.ComponentsCreating, AddressOf Me.OnComponentsCreating End Sub Private Sub OnComponentsCreating(ByVal sender As Object, ByVal e As ToolboxComponentsCreatingEventArgs) ' Displays ComponentsCreating event information on the Console. Console.WriteLine(("Name of the class of the root component of the designer host receiving new components: " + e.DesignerHost.RootComponentClassName)) End Sub
public void LinkToolboxComponentsCreatingEvent(ToolboxItem item) { item.ComponentsCreating += new ToolboxComponentsCreatingEventHandler(this.OnComponentsCreating); } private void OnComponentsCreating(object sender, ToolboxComponentsCreatingEventArgs e) { // Displays ComponentsCreating event information on the Console. Console.WriteLine("Name of the class of the root component of " + "the designer host receiving new components: " + e.DesignerHost.RootComponentClassName); }
public: [PermissionSetAttribute(SecurityAction::Demand, Name="FullTrust")] void LinkToolboxComponentsCreatingEvent( ToolboxItem^ item ) { item->ComponentsCreating += gcnew ToolboxComponentsCreatingEventHandler( this, &Form1::OnComponentsCreating ); } private: void OnComponentsCreating( Object^ sender, ToolboxComponentsCreatingEventArgs^ e ) { // Displays ComponentsCreating event information on the Console. Console::WriteLine( "Name of the class of the root component of " + "the designer host receiving new components: " + e->DesignerHost->RootComponentClassName ); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からToolboxComponentsCreatingEventHandler デリゲートを検索する場合は、下記のリンクをクリックしてください。

- ToolboxComponentsCreatingEventHandler デリゲートのページへのリンク