Windows.Item 属性

获取对 WindowsCollection 集合中指定的 WindowObject 对象的引用。

命名空间:  Microsoft.Office.Interop.InfoPath.SemiTrust
程序集:  Microsoft.Office.Interop.InfoPath.SemiTrust(位于 Microsoft.Office.Interop.InfoPath.SemiTrust.dll 中)

语法

声明
ReadOnly Default Property Item ( _
    varIndex As Object _
) As WindowObject
    Get
用法
Dim instance As Windows
Dim varIndex As Object
Dim value As WindowObject

value = instance(varIndex)
WindowObject this[
    Object varIndex
] { get; }

参数

  • varIndex
    类型:System.Object

    该表达式指定 WindowsCollection 集合的成员的位置。该参数必须是从 0 到集合的 Count 属性值减去 1 之间的数字。

属性值

类型:Microsoft.Office.Interop.InfoPath.SemiTrust.WindowObject

备注

如果为 varIndex 参数提供的值与集合的任何现有成员都不匹配,将发生错误。

在设置了对 Item 属性返回的对 WindowObject 对象的引用之后,可以访问其任何属性和方法。

重要

可以无限制访问此成员。

示例

因为 Item 属性是 WindowsCollection 集合的默认属性,所以可按如下方式使用它:

Window2 firstWindow;
firstWindow = thisApplication.Windows[0];

另请参阅

引用

Windows 接口

Windows 成员

Microsoft.Office.Interop.InfoPath.SemiTrust 命名空间