WindowCollection.Item プロパティ
WindowCollection オブジェクト内の指定された Window オブジェクトへの参照を取得します。
名前空間: Microsoft.Office.InfoPath
アセンブリ: Microsoft.Office.InfoPath (Microsoft.Office.InfoPath.dll)
構文
'宣言
Public MustOverride ReadOnly Default Property Item ( _
index As Integer _
) As Window
Get
'使用
Dim instance As WindowCollection
Dim index As Integer
Dim value As Window
value = instance(index)
public abstract Window this[
int index
] { get; }
パラメーター
- index
型: System.Int32
返される Window オブジェクトのゼロベースのインデックス。
プロパティ値
型: Microsoft.Office.InfoPath.Window
WindowCollection オブジェクトから取得した、指定されたインデックス値に対応する Window オブジェクト。
解説
index パラメーターに渡す値は、0 からコレクションの Count プロパティより 1 小さい値までの数字でなければなりません。
Item プロパティが返す Window オブジェクトへの参照を取得した後、このオブジェクトのすべてのプロパティとメソッドにアクセスできます。
このメンバーには、制約なしでアクセスできます。
この型またはメンバーには、Microsoft InfoPath Filler で開かれたフォームを実行中のコードからのみアクセスできます。
例
Item プロパティは WindowsCollection クラスの既定のプロパティなので、次のように使用することはできません。
Window firstWindow = this.Application.Windows[0];
Dim firstWindow As Window = Me.Application.Windows(0)