Type Property (Window Object)

Microsoft Office InfoPath

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.");