Share via


Window.Type Property

InfoPath Developer Reference

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. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.Type

expression   An expression that returns a Window object.

Return Value
XdWindowType

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.

Security Level 0: Can be accessed without restrictions.

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:

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

See Also