다음을 통해 공유


Windows.Count 속성

WindowsCollection 컬렉션에 포함된 WindowObject 개체의 수를 가져옵니다.

이 속성은 CLS 규격이 아닙니다.  

네임스페이스: Microsoft.Office.Interop.InfoPath.SemiTrust
어셈블리: Microsoft.Office.Interop.InfoPath.SemiTrust(microsoft.office.interop.infopath.semitrust.dll)

구문

<DispIdAttribute(1)> _
ReadOnly Property Count As Integer

Dim instance As Windows
Dim value As Integer

value = instance.Count
[DispIdAttribute(1)] 
int Count { get; }

주의

중요:

이 멤버는 무제한 액세스할 수 있습니다.

예제

다음 예제에서는 for 루프 내에서 Count 속성을 사용하여 Window 개체의 컬렉션 전체를 반복하고 창 유형 값을 나타내는 메시지 상자를 표시합니다.

for (int i=0; i < thisApplication.Windows.Count; i++)
{
 thisXDocument.UI.Alert("Window type: " + thisApplication.Windows[i].WindowType);
}

참고 항목

참조

Windows 인터페이스
Windows 구성원
Microsoft.Office.Interop.InfoPath.SemiTrust 네임스페이스