Show All

# Type Property (Window Object)

A read-only property that returns a long integer value that indicates the type of window that is represented by the Window object. The value returned is based on the XdWindowType enumeration.

expression.Type

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

## Security Level

0: Can be accessed without restrictions.

## Remarks

The Window objects represent the two types of windows that are used in the InfoPath application: the editing window that is used as the form area when a user fills out a form, and the designing window that is used as the design mode when a user designs a form.

## Example

In the following example, the Type property of the Window object is used to determine the type of window that is the currently active window:

    if (Application.ActiveWindow.Type == 0)
       XDocument.UI.Alert("The active window is an editing window.");
    else
       XDocument.UI.Alert("The active window is a designing window.");

©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