Window2.WindowType property

Gets an XdWindowType value that indicates the type of window that is represented by the WindowObject object.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property WindowType As XdWindowType
    Get
'Usage
Dim instance As Window2
Dim value As XdWindowType

value = instance.WindowType
XdWindowType WindowType { get; }

Property value

Type: Microsoft.Office.Interop.InfoPath.SemiTrust.XdWindowType

Implements

Window.WindowType

Remarks

The WindowObject objects represents 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.

Important

This member can be accessed without restrictions.

Examples

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

if (thisApplication.ActiveWindow.WindowType == 0)
 thisXDocument.UI.Alert("The active window is an editing window.");
else
 thisXDocument.UI.Alert("The active window is a designing window.");

See also

Reference

Window2 interface

Window2 members

WindowType overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace