ComponentEventArgs Class

 
Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

System::Object
  System::EventArgs
    System.ComponentModel.Design::ComponentEventArgs

[ComVisibleAttribute(true)]
[HostProtectionAttribute(SecurityAction::LinkDemand, SharedState = true)]
[PermissionSetAttribute(SecurityAction::LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = "FullTrust")]
public ref class ComponentEventArgs : EventArgs

NameDescription
System_CAPS_pubmethodComponentEventArgs(IComponent^)

Initializes a new instance of the ComponentEventArgs class.

NameDescription
System_CAPS_pubpropertyComponent

Gets the component associated with the event.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

ComponentEventArgs is the root event arguments class for all component management events. This type of event occurs when you add or remove components using a designer.

The following example demonstrates creating a ComponentEventArgs.

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 );
   }

.NET Framework
Available since 1.1

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

Return to top
Show: