Partager via


Windows.Count, propriété

Obtient le nombre d'objets WindowObject que contient la collection WindowsCollection.

Cette propriété n'est pas conforme à la spécification CLS.  

Espace de noms : Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly : Microsoft.Office.Interop.InfoPath.SemiTrust (dans microsoft.office.interop.infopath.semitrust.dll)

Syntaxe

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

Dim instance As Windows
Dim value As Integer

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

Remarques

Important :

Ce membre est accessible sans restrictions.

Exemple

Dans l'exemple suivant, la propriété Count est utilisée dans une boucle For pour itération dans la collection des objets Window et pour afficher une boîte de message indiquant la valeur du type de fenêtre :

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

Voir aussi

Référence

Windows, interface
Membres Windows
Microsoft.Office.Interop.InfoPath.SemiTrust, espace de noms