ToolboxComponentsCreatedEventArgs Class

ToolboxComponentsCreatedEventArgs Class

Provides data for the ComponentsCreated event that occurs when components are added to the toolbox.

For a list of all members of this type, see ToolboxComponentsCreatedEventArgs Members.

System.Object
   System.EventArgs
      System.Drawing.Design.ToolboxComponentsCreatedEventArgs

[Visual Basic]
Public Class ToolboxComponentsCreatedEventArgs
   Inherits EventArgs
[C#]
public class ToolboxComponentsCreatedEventArgs : EventArgs
[C++]
public __gc class ToolboxComponentsCreatedEventArgs : public
   EventArgs
[JScript]
public class ToolboxComponentsCreatedEventArgs extends EventArgs

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

The ComponentsCreated event is raised when components are added to the toolbox. ToolboxComponentsCreatedEventArgs provides data indicating which component or components are being added.

Example

[Visual Basic, C#, C++] The following example method returns a System.Drawing.Design.ToolboxComponentCreatedEventAgs that indicates the components that have been created:

[Visual Basic] 
Public Function CreateToolboxComponentsCreatedEventArgs(ByVal components() As System.ComponentModel.IComponent) As ToolboxComponentsCreatedEventArgs
    Dim e As New ToolboxComponentsCreatedEventArgs(components)
    ' The components that were just created        e.Components            
    Return e
End Function


[C#] 
public ToolboxComponentsCreatedEventArgs CreateToolboxComponentsCreatedEventArgs(System.ComponentModel.IComponent[] components)
{
    ToolboxComponentsCreatedEventArgs e = new ToolboxComponentsCreatedEventArgs(components);
    // The components that were just created        e.Components            
    return e;
}

[C++] 
public:
   ToolboxComponentsCreatedEventArgs* CreateToolboxComponentsCreatedEventArgs(System::ComponentModel::IComponent* components[]) {
      ToolboxComponentsCreatedEventArgs* e = new ToolboxComponentsCreatedEventArgs(components);
      // The components that were just created        e.Components
      return e;
   }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Drawing.Design

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

Assembly: System.Drawing (in System.Drawing.dll)

See Also

ToolboxComponentsCreatedEventArgs Members | System.Drawing.Design Namespace | ToolboxComponentsCreatedEventHandler | ComponentsCreated

Show:
© 2016 Microsoft