Application.Windows Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient une référence à .WindowCollection
public:
abstract property Microsoft::Office::InfoPath::WindowCollection ^ Windows { Microsoft::Office::InfoPath::WindowCollection ^ get(); };
public abstract Microsoft.Office.InfoPath.WindowCollection Windows { get; }
member this.Windows : Microsoft.Office.InfoPath.WindowCollection
Public MustOverride ReadOnly Property Windows As WindowCollection
Valeur de propriété
pour WindowCollection la session active.
Exemples
Dans l’exemple suivant, la Show(String) méthode de la MessageBox classe est utilisée pour afficher des boîtes de message avec le nombre de fenêtres ouvertes (à l’aide de la Count propriété ) et la légende de la première fenêtre de la collection (à l’aide de la Caption propriété ).
int windowCount = this.Application.Windows.Count;
Window myWindow = this.Application.Windows[0];
MessageBox.Show ("Count: " + windowCount.ToString());
MessageBox.Show("Caption: " + myWindow.Caption);
Dim windowCount As Integer = Me.Application.Windows.Count
Dim myWindow As Window = Me.Application.Windows(0)
MessageBox.Show ("Count: " & windowCount.ToString())
MessageBox.Show("Caption: " & myWindow.Caption)
Remarques
Après avoir défini une référence à la classe WindowsCollection , vous pouvez utiliser ses propriétés pour accéder à chacun des Window objets qu’elle contient.
Remarque : Le type WindowsCollection peut être utilisé uniquement pour obtenir le nombre d’objets Window qu’il contient ou pour renvoyer une référence à un objet Window . Il ne peut pas être utilisé pour ajouter ou supprimer des objets Window.
Vous pouvez accéder à ce membre sans restrictions.
Vous pouvez uniquement accéder à ce type ou à ce membre à partir du code exécuté dans les formulaires ouverts dans Microsoft InfoPath Filler.