ComponentEventArgs Class
Assembly: System (in system.dll)
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.
Note: |
|---|
| The HostProtectionAttribute attribute applied to this class has the following Resources property value: SharedState. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes. |
The following example demonstrates creating a 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 ComponentEventArgs CreateComponentEventArgs(IComponent component) { ComponentEventArgs args = new ComponentEventArgs(component); // The component that is related to the event: args.Component return args; }
// 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
Windows 98, Windows Server 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
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Note: