Active Property

A read-only property that returns a Boolean value that indicates whether the window associated with the Window object is the active window.

expression.Active

expression    Required. An expression that returns a reference to the Window object.

Security Level

0: Can be accessed without restrictions.

Remarks

To designate a window as the active window, use the Activate method of the Window object.

Example

In the following example, the Active property of the Window object is used to determine whether the first window contained in the Windows collection is the active window:

if (Application.Windows(0).Active)
{
   XDocument.UI.Alert("The window is active.");
}

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp