次の方法で共有


Application.Windows プロパティ

定義

への参照を取得します WindowCollection

public:
 abstract property Microsoft::Office::InfoPath::WindowCollection ^ Windows { Microsoft::Office::InfoPath::WindowCollection ^ get(); };
public abstract Microsoft.Office.InfoPath.WindowCollection Windows { get; }
member this.Windows : Microsoft.Office.InfoPath.WindowCollection
Public MustOverride ReadOnly Property Windows As WindowCollection

プロパティ値

現在のセッションの 。WindowCollection

次の例では、 クラスの メソッドをMessageBoxShow(String)使用して、開いているウィンドウの数 (プロパティを使用) とコレクション内の最初のウィンドウのキャプション (プロパティを使用Count) でメッセージ ボックスをCaption表示します。

int windowCount = this.Application.Windows.Count;
Window myWindow = this.Application.Windows[0];
MessageBox.Show ("Count: " + windowCount.ToString());
MessageBox.Show("Caption: " + myWindow.Caption);
Dim windowCount As Integer = Me.Application.Windows.Count
Dim myWindow As Window  = Me.Application.Windows(0)
MessageBox.Show ("Count: " & windowCount.ToString())
MessageBox.Show("Caption: " & myWindow.Caption)

注釈

WindowsCollection クラスへの参照を設定したら、そのプロパティを使用して、そのクラスに含まれる各Windowオブジェクトにアクセスできます。

: WindowsCollection 型は、含まれている Window オブジェクトの数を取得する場合、または Window オブジェクトへの参照を返す場合にのみ使用できます。 Window オブジェクトを追加または削除するためには使用できません。

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

この型またはメンバーには、Microsoft InfoPath Filler で開いたフォームで実行されるコードからのみアクセスできます。

適用対象