共用方式為


ComponentEventArgs 類別

定義

public ref class ComponentEventArgs : EventArgs
public class ComponentEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentEventArgs : EventArgs
type ComponentEventArgs = class
    inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentEventArgs = class
    inherit EventArgs
Public Class ComponentEventArgs
Inherits EventArgs
繼承
ComponentEventArgs
屬性

範例

下列範例示範如何建立 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 );
   }
// 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 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

備註

ComponentEventArgs 是所有元件管理事件的根事件自變數類別。 當您使用設計工具新增或移除元件時,就會發生這種事件。

建構函式

ComponentEventArgs(IComponent)

初始化 ComponentEventArgs 類別的新執行個體。

屬性

Component

取得與事件相關的元件。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱