Sdílet prostřednictvím


Windows.Count-Eigenschaft

Ruft die Anzahl des WindowObject-Objekts in der WindowsCollection-Auflistung ab.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)

Syntax

'Declaration
<DispIdAttribute(1)> _
ReadOnly Property Count As Integer
'Usage
Dim instance As Windows
Dim value As Integer

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

Beispiel

Im folgenden Beispiel wird die Count-Eigenschaft innerhalb einer "for"-Schleife verwendet, um die Auflistung der Window-Objekte zu durchlaufen und ein Meldungsfeld anzuzeigen, das den Wert des Fenstertyps angibt:

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

Siehe auch

Referenz

Windows-Schnittstelle
Windows-Member
Microsoft.Office.Interop.InfoPath-Namespace