This documentation is archived and is not being maintained.

ActiveDesignerEventArgs Class

Provides data for the ActiveDesigner event.

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


[Visual Basic]
Public Class ActiveDesignerEventArgs
   Inherits EventArgs
public class ActiveDesignerEventArgs : EventArgs
public __gc class ActiveDesignerEventArgs : public EventArgs
public class ActiveDesignerEventArgs 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.


The ActiveDesigner event occurs when the currently active document changes. The active document changes when a new document is created, an existing document is opened, or a document is closed.

When you create an ActiveDesignerEventArgs delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see Events and Delegates.


[Visual Basic, C#, C++] The following example method returns an ActiveDesignerEventArgs that contains a specified reference to the IDesignerHost for the designer losing focus and a specified reference to the IDesignerHost for the designer gaining focus.

[Visual Basic] 
Public Function CreateActiveDesignerEventArgs(ByVal losingFocus As IDesignerHost, ByVal gainingFocus As IDesignerHost) As ActiveDesignerEventArgs
    Dim e As New ActiveDesignerEventArgs(losingFocus, gainingFocus)
    Return e
End Function

public ActiveDesignerEventArgs CreateActiveDesignerEventArgs(IDesignerHost losingFocus, IDesignerHost gainingFocus)
    ActiveDesignerEventArgs e = new ActiveDesignerEventArgs(losingFocus, gainingFocus);
    return e;

ActiveDesignerEventArgs* CreateActiveDesignerEventArgs(IDesignerHost* losingFocus, IDesignerHost* gainingFocus) {
    ActiveDesignerEventArgs* e = new ActiveDesignerEventArgs(losingFocus, gainingFocus);
    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.


Namespace: System.ComponentModel.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 (in System.dll)

See Also

ActiveDesignerEventArgs Members | System.ComponentModel.Design Namespace | ActiveDesignerEventHandler | ActiveDesigner