次の方法で共有


Window2.WindowType プロパティ

WindowObject オブジェクトによって表されるウィンドウの種類を示す XdWindowType の値を取得します。

このプロパティは、CLS に準拠していません。  

名前空間: Microsoft.Office.Interop.InfoPath.SemiTrust
アセンブリ: Microsoft.Office.Interop.InfoPath.SemiTrust (microsoft.office.interop.infopath.semitrust.dll 内)

構文

'宣言
<DispIdAttribute(7)> _
ReadOnly Property WindowType As XdWindowType
'使用
Dim instance As Window2
Dim value As XdWindowType

value = instance.WindowType
[DispIdAttribute(7)] 
XdWindowType WindowType { get; }

コメント

WindowObject オブジェクトは、InfoPath アプリケーションで使用される 2 種類のウィンドウを表します。1 つはユーザーがフォームに入力するときにフォーム領域として使用される編集ウィンドウで、もう 1 つはユーザーがフォームをデザインするときにデザイン モードとして使用するデザイン ウィンドウです。

メモ重要 :

このメンバは制限なしでアクセスできます。

次の例では、Window オブジェクトの WindowType プロパティを使用して、現在アクティブなウィンドウの種類を特定します。

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

関連項目

参照

Window2 インターフェイス
Window2 のメンバ
Microsoft.Office.Interop.InfoPath.SemiTrust 名前空間